Fix bad deserialization of extruder_offset = 0x0

This commit is contained in:
Alessandro Ranellucci 2014-03-24 14:16:37 +01:00
parent 7a58457add
commit 4c6f9703df
3 changed files with 33 additions and 8 deletions

View file

@ -4,7 +4,7 @@ use strict;
use warnings;
use Slic3r::XS;
use Test::More tests => 94;
use Test::More tests => 95;
foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
$config->set('layer_height', 0.3);
@ -144,4 +144,13 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
}
}
{
my $config = Slic3r::Config->new;
# the pair [0,0] is part of the test, since it checks whether the 0x0 serialized value is correctly parsed
$config->set('extruder_offset', [ [0,0], [20,0], [0,20] ]);
my $config2 = Slic3r::Config->new;
$config2->apply($config);
is_deeply $config->get('extruder_offset'), $config2->get('extruder_offset'), 'apply dynamic over dynamic';
}
__END__