aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/json/json_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/json/json_test.c')
-rw-r--r--test/core/json/json_test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/core/json/json_test.c b/test/core/json/json_test.c
index 5add80d753..035265a6be 100644
--- a/test/core/json/json_test.c
+++ b/test/core/json/json_test.c
@@ -64,6 +64,7 @@ static testing_pair testing_pairs[] = {
/* Testing UTF-8 character "𝄞", U+11D1E. */
{"\"\xf0\x9d\x84\x9e\"", "\"\\ud834\\udd1e\""},
{"\"\\ud834\\udd1e\"", "\"\\ud834\\udd1e\""},
+ {"{\"\\ud834\\udd1e\":0}", "{\"\\ud834\\udd1e\":0}"},
/* Testing nested empty containers. */
{
" [ [ ] , { } , [ ] ] ", "[[],{},[]]",
@@ -85,20 +86,31 @@ static testing_pair testing_pairs[] = {
/* Testing plain invalid things, exercising the state machine. */
{"\\", NULL},
{"nu ll", NULL},
+ {"{\"foo\": bar}", NULL},
+ {"{\"foo\": bar\"x\"}", NULL},
{"fals", NULL},
/* Testing unterminated string. */
{"\"\\x", NULL},
/* Testing invalid UTF-16 number. */
{"\"\\u123x", NULL},
+ {"{\"\\u123x", NULL},
/* Testing imbalanced surrogate pairs. */
{"\"\\ud834f", NULL},
+ {"{\"\\ud834f\":0}", NULL},
{"\"\\ud834\\n", NULL},
+ {"{\"\\ud834\\n\":0}", NULL},
{"\"\\udd1ef", NULL},
+ {"{\"\\udd1ef\":0}", NULL},
{"\"\\ud834\\ud834\"", NULL},
+ {"{\"\\ud834\\ud834\"\":0}", NULL},
{"\"\\ud834\\u1234\"", NULL},
+ {"{\"\\ud834\\u1234\"\":0}", NULL},
{"\"\\ud834]\"", NULL},
+ {"{\"\\ud834]\"\":0}", NULL},
{"\"\\ud834 \"", NULL},
+ {"{\"\\ud834 \"\":0}", NULL},
{"\"\\ud834\\\\\"", NULL},
+ {"{\"\\ud834\\\\\"\":0}", NULL},
/* Testing embedded invalid whitechars. */
{"\"\n\"", NULL},
{"\"\t\"", NULL},