X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-json.c;h=24dc7003bc64292c109b2012da008d73b8ec9106;hb=e0952d9d021234e79f3a70f33a9e5d201872a417;hp=e53e8ed50f18d932ebd1c6bb03b29253a895434f;hpb=2bb4c7e384c31de4727f1330da3f4de2f0bb7784;p=elogind.git diff --git a/src/test/test-json.c b/src/test/test-json.c index e53e8ed50..24dc7003b 100644 --- a/src/test/test-json.c +++ b/src/test/test-json.c @@ -21,7 +21,6 @@ #include -#include "log.h" #include "util.h" #include "json.h" @@ -99,6 +98,9 @@ int main(int argc, char *argv[]) { 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); + test_one("\"\\ud800a\"", -EINVAL); + test_one("\"\\udc00\\udc00\"", -EINVAL); + test_one("\"\\ud801\\udc37\"", JSON_STRING, "\xf0\x90\x90\xb7", JSON_END); return 0; }