diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-08-24 15:53:24 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-08-24 17:44:07 +0100 |
commit | 1fdaf7ab76c966e0318a62e922c7b7d8507ecc48 (patch) | |
tree | 46557087c3ee8ecbba96bd7989fa3a1cef672406 /json-glib/tests/invalid.c | |
parent | 67ce7b204483894fffb7ea6feddcbac00bc1a9bf (diff) | |
download | json-glib-1fdaf7ab76c966e0318a62e922c7b7d8507ecc48.tar.gz |
Properly detect multiple top level statements
JSON can only have one top level statement. If we get multiple
statements, we should error out appropriately, and we should also avoid
leaking the node for the previously parsed statement.
Fixes: #45
Diffstat (limited to 'json-glib/tests/invalid.c')
-rw-r--r-- | json-glib/tests/invalid.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/json-glib/tests/invalid.c b/json-glib/tests/invalid.c index b782566..0ab2d30 100644 --- a/json-glib/tests/invalid.c +++ b/json-glib/tests/invalid.c @@ -208,6 +208,7 @@ static const struct { "bareword-3", "{ \"foo\" : ponies }", test_invalid_bareword }, { "bareword-4", "[ 3, 2, 1, lift_off ]", test_invalid_bareword }, { "bareword-5", "{ foo : 42 }", test_invalid_bareword }, + { "bareword-6", "\"st\"ring\"", test_invalid_bareword }, /* values */ { "values-1", "[ -false ]", test_invalid_value }, |