diff --git a/tests/tester.cc b/tests/tester.cc index 82748fa..638507d 100644 --- a/tests/tester.cc +++ b/tests/tester.cc @@ -768,14 +768,20 @@ TEST_CASE("invalid-face-definition", "[face]") { REQUIRE(0 == shapes[0].mesh.indices.size()); } -TEST_CASE("Empty mtl basedir", "[Issue177]") { - // Win32 spesific? +TEST_CASE("Empty mtl basedir", "[Issue177]") { tinyobj::attrib_t attrib; std::vector shapes; std::vector materials; - + std::string err; - bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &err, "issue-177.obj"); + + // A case where the user explicitly provides an empty string + // Win32 specific? + const char * userBaseDir = ""; + bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &err, "issue-177.obj", userBaseDir); + + // if mtl loading fails, we get an error message (WARN) here + ret &= err.empty(); if (!err.empty()) { std::cerr << "[Issue177] " << err << std::endl;