mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-09 23:05:04 -06:00
Gracefully handle loading config files having empty strings for multi-value options (like wipe). #2003
This commit is contained in:
parent
85b0a4376a
commit
a8b6e32767
2 changed files with 6 additions and 2 deletions
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 112;
|
||||
use Test::More tests => 114;
|
||||
|
||||
foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
|
||||
$config->set('layer_height', 0.3);
|
||||
|
@ -101,6 +101,8 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
|
|||
is $config->serialize('wipe'), '1,0', 'serialize bools';
|
||||
$config->set_deserialize('wipe', '0,1,1');
|
||||
is_deeply $config->get('wipe'), [0,1,1], 'deserialize bools';
|
||||
$config->set_deserialize('wipe', '');
|
||||
is_deeply $config->get('wipe'), [], 'deserialize bools from empty string';
|
||||
$config->set_deserialize('retract_layer_change', 0);
|
||||
is_deeply $config->get('retract_layer_change'), [0], 'deserialize bools from non-string value';
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue