diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 69dea5efb..6bab94664 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -154,6 +154,7 @@ set(SLIC3R_INCLUDES ) set(LIBSLIC3R_INCLUDES ${LIBDIR}/libslic3r + ${LIBDIR}/libslic3r/IO ) @@ -313,6 +314,7 @@ set(SLIC3R_TEST_SOURCES ${TESTDIR}/libslic3r/test_skirt_brim.cpp ${TESTDIR}/libslic3r/test_test_data.cpp ${TESTDIR}/libslic3r/test_trianglemesh.cpp + ${TESTDIR}/libslic3r/test_3mf.cpp ) diff --git a/src/test/inputs/test_3mf/Geräte/box.3mf b/src/test/inputs/test_3mf/Geräte/box.3mf new file mode 100755 index 000000000..3b5a8350d Binary files /dev/null and b/src/test/inputs/test_3mf/Geräte/box.3mf differ diff --git a/src/test/libslic3r/test_3mf.cpp b/src/test/libslic3r/test_3mf.cpp new file mode 100644 index 000000000..09384d790 --- /dev/null +++ b/src/test/libslic3r/test_3mf.cpp @@ -0,0 +1,20 @@ +#include +#include +#include +#include "Model.hpp" +#include "TMF.hpp" + + +using namespace Slic3r; + +SCENARIO("Reading 3mf file") { + GIVEN("umlauts in the path of the file") { + auto model {new Slic3r::Model()}; + WHEN("3mf model is read") { + auto ret = Slic3r::IO::TMF::read(std::string(testfile_dir) +"test_3mf/Geräte/box.3mf",model); + THEN("read should not return 0") { + REQUIRE(ret == 1); + } + } + } +} diff --git a/xs/t/models/Geräte/box.3mf b/xs/t/models/Geräte/box.3mf new file mode 100755 index 000000000..3b5a8350d Binary files /dev/null and b/xs/t/models/Geräte/box.3mf differ