diff options
Diffstat (limited to 'tests/fff_print/test_data.cpp')
-rw-r--r-- | tests/fff_print/test_data.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/fff_print/test_data.cpp b/tests/fff_print/test_data.cpp index 70f82f4a5..09ca730ec 100644 --- a/tests/fff_print/test_data.cpp +++ b/tests/fff_print/test_data.cpp @@ -244,8 +244,12 @@ std::string gcode(Print & print) boost::filesystem::path temp = boost::filesystem::unique_path(); print.set_status_silent(); print.process(); +#if ENABLE_GCODE_VIEWER + print.export_gcode(temp.string(), nullptr, nullptr); +#else print.export_gcode(temp.string(), nullptr); - std::ifstream t(temp.string()); +#endif // ENABLE_GCODE_VIEWER + std::ifstream t(temp.string()); std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>()); boost::nowide::remove(temp.string().c_str()); return str; |