@@ -1408,6 +1408,31 @@ void test_face_missing_issue295() {
14081408 TEST_CHECK ((3 * 28 ) == shapes[0 ].mesh .indices .size ()); // 28 triangle faces x 3
14091409}
14101410
1411+ void test_comment_issue389 () {
1412+ tinyobj::attrib_t attrib;
1413+ std::vector<tinyobj::shape_t > shapes;
1414+ std::vector<tinyobj::material_t > materials;
1415+
1416+ std::string warn;
1417+ std::string err;
1418+ bool ret = tinyobj::LoadObj (
1419+ &attrib, &shapes, &materials, &warn, &err,
1420+ " ../models/issue-389-comment.obj" ,
1421+ gMtlBasePath , /* triangualte */ false );
1422+
1423+ TEST_CHECK (warn.empty ());
1424+
1425+ if (!warn.empty ()) {
1426+ std::cout << " WARN: " << warn << std::endl;
1427+ }
1428+
1429+ if (!err.empty ()) {
1430+ std::cerr << " ERR: " << err << std::endl;
1431+ }
1432+
1433+ TEST_CHECK (true == ret);
1434+ }
1435+
14111436// Fuzzer test.
14121437// Just check if it does not crash.
14131438// Disable by default since Windows filesystem can't create filename of afl
@@ -1511,6 +1536,8 @@ TEST_LIST = {
15111536 test_mtl_filename_with_whitespace_issue46},
15121537 {" test_face_missing_issue295" ,
15131538 test_face_missing_issue295},
1539+ {" test_comment_issue389" ,
1540+ test_comment_issue389},
15141541 {" test_invalid_relative_vertex_index" ,
15151542 test_invalid_relative_vertex_index},
15161543 {" test_invalid_texture_vertex_index" ,
0 commit comments