File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4174,8 +4174,11 @@ void test_loadobjopt_object_name_trimming() {
41744174 obj_text, obj_len, config);
41754175 TEST_CHECK (ret == true );
41764176 TEST_CHECK (shapes.size () == 1 );
4177- // Legacy parser preserves spaces: "o MyObject " -> name = " MyObject "
4178- // (first space consumed by 'o ' directive, rest preserved)
4177+ // Legacy parser uses sr.advance(2) to skip 'o' + one space, then
4178+ // sr.read_line() captures the remainder verbatim. For "o MyObject \n",
4179+ // advance(2) skips 'o' and the first space, leaving " MyObject " as the
4180+ // object name (leading space is the second space from the original input,
4181+ // and trailing spaces are preserved).
41794182 TEST_CHECK (shapes[0 ].name == " MyObject " );
41804183}
41814184
You can’t perform that action at this time.
0 commit comments