From 5e37daeec3cb49dc34a9377d3d2230c0394d1f3c Mon Sep 17 00:00:00 2001 From: "Serge A. Zaitsev" Date: Sat, 17 Oct 2015 15:01:01 +0200 Subject: [PATCH] added issue 27 test case --- test/tests.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/tests.c b/test/tests.c index 4171f6f..4563d39 100644 --- a/test/tests.c +++ b/test/tests.c @@ -256,6 +256,13 @@ int test_issue_22(void) { return 0; } +int test_issue_27(void) { + const char *js = + "{ \"name\" : \"Jack\", \"age\" : 27 } { \"name\" : \"Anna\", "; + check(parse(js, JSMN_ERROR_PART, 8)); + return 0; +} + int test_input_length(void) { const char *js; int r; @@ -355,6 +362,7 @@ int main(void) { test(test_unquoted_keys, "test unquoted keys (like in JavaScript)"); test(test_input_length, "test strings that are not null-terminated"); test(test_issue_22, "test issue #22"); + test(test_issue_27, "test issue #22"); test(test_count, "test tokens count estimation"); test(test_nonstrict, "test for non-strict mode"); printf("\nPASSED: %d\nFAILED: %d\n", test_passed, test_failed);