diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2014-03-26 22:42:01 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2014-03-26 22:42:01 +0400 |
commit | 10bf334a587a59482f814935aae9056fef34a073 (patch) | |
tree | cd90d9d3566e961d4d409524bd3f4d6497ee2b17 /t/print.t | |
parent | 4540350b664c20b40ce88ccb208d531f43496cc8 (diff) |
Added one more failing test to address bad option priority hierarchy
Diffstat (limited to 't/print.t')
-rw-r--r-- | t/print.t | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1,4 +1,4 @@ -use Test::More tests => 2; +use Test::More tests => 3; use strict; use warnings; @@ -30,4 +30,21 @@ use Slic3r::Test; ok abs(unscale($center->[Y]) - $config->print_center->[Y]) < epsilon, 'print is centered around print_center (Y)'; } +{ + # this represents the aggregate config from presets + my $config = Slic3r::Config->new_from_defaults; + + # user adds one object to the plater + my $print = Slic3r::Test::init_print('20mm_cube', config => $config); + + # user sets a per-object option + $print->objects->[0]->config->set('fill_density', 100); + $print->reload_object(0); + + # user exports G-code, thus the default config is reapplied + $print->apply_config($config); + + is $print->objects->[0]->config->fill_density, 100, 'apply_config() does not override per-object settings'; +} + __END__ |