Skip to content

Commit cf00588

Browse files
Add an extra test for single parsing
1 parent 4349f37 commit cf00588

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/tests.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,13 @@ int test_multiple_objects(void) {
522522
JSMN_PRIMITIVE, "27"));
523523
#endif
524524

525+
js = " ";
526+
#ifdef JSMN_SINGLE
527+
check(parse(js, JSMN_ERROR_PART, 1));
528+
#else
529+
check(parse(js, 0, 0));
530+
#endif
531+
525532
#ifdef JSMN_SINGLE
526533
#ifdef JSMN_PERMISSIVE_PRIMITIVES
527534
js = "tru{\"def\": 123}";

0 commit comments

Comments
 (0)