Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t/print.t
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2014-03-26 22:42:01 +0400
committerAlessandro Ranellucci <aar@cpan.org>2014-03-26 22:42:01 +0400
commit10bf334a587a59482f814935aae9056fef34a073 (patch)
treecd90d9d3566e961d4d409524bd3f4d6497ee2b17 /t/print.t
parent4540350b664c20b40ce88ccb208d531f43496cc8 (diff)
Added one more failing test to address bad option priority hierarchy
Diffstat (limited to 't/print.t')
-rw-r--r--t/print.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/t/print.t b/t/print.t
index b4ff20145..746ce5d3c 100644
--- a/t/print.t
+++ b/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__