X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Ftest%2Ftest-json.c;h=e53e8ed50f18d932ebd1c6bb03b29253a895434f;hp=00768358bf4469105b7ee05e43b2f0c6a3c51559;hb=2bb4c7e384c31de4727f1330da3f4de2f0bb7784;hpb=856d6e09887730f115e43faf9577b479f2beb3c4;ds=sidebyside diff --git a/src/test/test-json.c b/src/test/test-json.c index 00768358b..e53e8ed50 100644 --- a/src/test/test-json.c +++ b/src/test/test-json.c @@ -98,6 +98,7 @@ int main(int argc, char *argv[]) { test_one("{\"foo\" : [true, false]}", JSON_OBJECT_OPEN, JSON_STRING, "foo", JSON_COLON, JSON_ARRAY_OPEN, JSON_BOOLEAN, true, JSON_COMMA, JSON_BOOLEAN, false, JSON_ARRAY_CLOSE, JSON_OBJECT_CLOSE, JSON_END); test_one("\"\xef\xbf\xbd\"", JSON_STRING, "\xef\xbf\xbd", JSON_END); test_one("\"\\ufffd\"", JSON_STRING, "\xef\xbf\xbd", JSON_END); + test_one("\"\\uf\"", -EINVAL); return 0; }