mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 19:41:58 +08:00
Adjust test for current_extruder being second extruder
This commit is contained in:
parent
8216f22d70
commit
b22b1ae300
@ -224,17 +224,27 @@ SCENARIO( "PrintGCode basic functionality") {
|
|||||||
}
|
}
|
||||||
WHEN("current_extruder exists in start_gcode") {
|
WHEN("current_extruder exists in start_gcode") {
|
||||||
config->set("start_gcode", "; Extruder [current_extruder]");
|
config->set("start_gcode", "; Extruder [current_extruder]");
|
||||||
Slic3r::Model model;
|
{
|
||||||
auto print {Slic3r::Test::init_print({TestMesh::cube_20x20x20}, model, config)};
|
Slic3r::Model model;
|
||||||
Slic3r::Test::gcode(gcode, print);
|
auto print {Slic3r::Test::init_print({TestMesh::cube_20x20x20}, model, config)};
|
||||||
auto exported {gcode.str()};
|
Slic3r::Test::gcode(gcode, print);
|
||||||
THEN("current_extruder is processed in the start gcode and set for first extruder") {
|
auto exported {gcode.str()};
|
||||||
REQUIRE(exported.find("; Extruder 0") != std::string::npos);
|
THEN("current_extruder is processed in the start gcode and set for first extruder") {
|
||||||
|
REQUIRE(exported.find("; Extruder 0") != std::string::npos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Slic3r::Test::gcode(gcode, print);
|
config->set("solid_infill_extruder", 2);
|
||||||
auto exported {gcode.str()};
|
config->set("support_material_extruder", 2);
|
||||||
THEN("current_extruder is processed in the start gcode and set for second extruder") {
|
config->set("infill_extruder", 2);
|
||||||
REQUIRE(exported.find("; Extruder 1") != std::string::npos);
|
config->set("perimeter_extruder", 2);
|
||||||
|
{
|
||||||
|
Slic3r::Model model;
|
||||||
|
auto print {Slic3r::Test::init_print({TestMesh::cube_20x20x20}, model, config)};
|
||||||
|
Slic3r::Test::gcode(gcode, print);
|
||||||
|
auto exported {gcode.str()};
|
||||||
|
THEN("current_extruder is processed in the start gcode and set for second extruder") {
|
||||||
|
REQUIRE(exported.find("; Extruder 1") != std::string::npos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user