summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSerge A. Zaitsev <zaitsev.serge@gmail.com>2015-10-17 15:01:01 +0200
committerSerge A. Zaitsev <zaitsev.serge@gmail.com>2015-10-17 15:01:01 +0200
commit5e37daeec3cb49dc34a9377d3d2230c0394d1f3c (patch)
tree0bbb1395c743f67edd38e96138a15af3d1cc4664 /test
parentedd751896de5de1fcee95cb65949e6784c726751 (diff)
added issue 27 test case
Diffstat (limited to 'test')
-rw-r--r--test/tests.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/tests.c b/test/tests.c
index 4171f6f94..4563d3985 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);