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
diff options
context:
space:
mode:
authorVojtech Bubnik <bubnikv@gmail.com>2021-09-10 13:28:52 +0300
committerVojtech Bubnik <bubnikv@gmail.com>2021-09-10 13:28:52 +0300
commit34c4b74af49c12e89fc6b5cc2bcfa36c69797578 (patch)
tree9f61ca9ad6d5ebcb85c0fb3043411dca1007476d /t
parentdc4b783e9ec38756432789e97b6089d62b6b1d14 (diff)
Fixed Perl unit tests
Diffstat (limited to 't')
-rw-r--r--t/cooling.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/cooling.t b/t/cooling.t
index a7720fd07..9ac5a24f4 100644
--- a/t/cooling.t
+++ b/t/cooling.t
@@ -33,7 +33,10 @@ sub buffer {
$gcodegen = Slic3r::GCode->new;
$gcodegen->apply_print_config($print_config);
$gcodegen->set_layer_count(10);
- $gcodegen->set_extruders([ 0 ]);
+
+ my @extruders = shift;
+ @extruders = [ 0 ] if int(@extruders) == 0;
+ $gcodegen->set_extruders(\@extruders);
return Slic3r::GCode::CoolingBuffer->new($gcodegen);
}
@@ -131,8 +134,8 @@ $config->set('disable_fan_first_layers', [ 0 ]);
'cooling' => [ 1 , 0 ],
'fan_below_layer_time' => [ $print_time2 + 1, $print_time2 + 1 ],
'slowdown_below_layer_time' => [ $print_time2 + 2, $print_time2 + 2 ]
- });
- $gcodegen->set_extruders([ 0, 1 ]);
+ },
+ [ 0, 1]);
my $gcode = $buffer->process_layer($gcode1 . "T1\nG1 X0 E1 F3000\n", 0);
like $gcode, qr/^M106/, 'fan is activated for the 1st tool';
like $gcode, qr/.*M107/, 'fan is disabled for the 2nd tool';