From fe33cb877cc2479aedd795da29e443ba188358fd Mon Sep 17 00:00:00 2001 From: "Dominick C. Pastore" Date: Sat, 30 May 2020 10:57:03 -0400 Subject: [PATCH] Add an extra test for single parsing --- test/tests.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/tests.c b/test/tests.c index b94d9ceb..914f68ad 100644 --- a/test/tests.c +++ b/test/tests.c @@ -522,6 +522,13 @@ int test_multiple_objects(void) { JSMN_PRIMITIVE, "27")); #endif + js = " "; +#ifdef JSMN_SINGLE + check(parse(js, JSMN_ERROR_PART, 1)); +#else + check(parse(js, 0, 0)); +#endif + #ifdef JSMN_SINGLE #ifdef JSMN_PERMISSIVE_PRIMITIVES js = "tru{\"def\": 123}";