Added one more failing test to address bad option priority hierarchy
This commit is contained in:
parent
4540350b66
commit
10bf334a58
3 changed files with 36 additions and 5 deletions
19
t/print.t
19
t/print.t
|
@ -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__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue