diff options
author | bubnikv <bubnikv@gmail.com> | 2017-11-28 17:19:57 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-11-28 17:19:57 +0300 |
commit | 672194b475e2ec6d25ed2cc3e6164144a9f7d84e (patch) | |
tree | 666d664f135fa2d4ceb56c709d9ceb7c28e09e3f /t | |
parent | f58b2173694443e3a99f0508d5164aa276b02fc4 (diff) |
Ported the between_objects_gcode custom G-code blocks,
thanks @lordofhyphens, https://github.com/alexrj/Slic3r/pull/3275
Improved handling of custom G-code blocks: Slic3r will try to extract
the target extruder and bed temperatures from the custom G-code blocks.
Diffstat (limited to 't')
-rw-r--r-- | t/custom_gcode.t | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/custom_gcode.t b/t/custom_gcode.t index 2cb9a44b8..91c7e7618 100644 --- a/t/custom_gcode.t +++ b/t/custom_gcode.t @@ -1,4 +1,4 @@ -use Test::More tests => 40; +use Test::More tests => 41; use strict; use warnings; @@ -210,4 +210,13 @@ use Slic3r::Test; } } +{ + my $config = Slic3r::Config::new_from_defaults; + $config->set('complete_objects', 1); + $config->set('between_objects_gcode', '_MY_CUSTOM_GCODE_'); + my $print = Slic3r::Test::init_print('20mm_cube', config => $config, duplicate => 3); + my $gcode = Slic3r::Test::gcode($print); + is scalar(() = $gcode =~ /^_MY_CUSTOM_GCODE_/gm), 2, 'between_objects_gcode is applied correctly'; +} + __END__ |