From: Michal Privoznik Date: Thu, 24 Aug 2023 07:56:25 +0000 (+0200) Subject: virjsontest: Introduce a test case for an empty array X-Git-Tag: v9.7.0-rc1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=148b7aa7e2470e835969d722598c960919a04574;p=thirdparty%2Flibvirt.git virjsontest: Introduce a test case for an empty array Previous commits were all about empty strings and empty JSON arrays. Introduce a test case for "[]" to make sure we pare it correctly. Signed-off-by: Michal Privoznik Reviewed-by: Kristina Hanicova --- diff --git a/tests/virjsontest.c b/tests/virjsontest.c index 294889a795..6b6a64d3d3 100644 --- a/tests/virjsontest.c +++ b/tests/virjsontest.c @@ -553,6 +553,7 @@ mymain(void) DO_TEST_PARSE("integer", "1", NULL); DO_TEST_PARSE("boolean", "true", NULL); DO_TEST_PARSE("null", "null", NULL); + DO_TEST_PARSE("[]", "[]", NULL); DO_TEST_PARSE("escaping symbols", "[\"\\\"\\t\\n\\\\\"]", NULL); DO_TEST_PARSE("escaped strings", "[\"{\\\"blurb\\\":\\\"test\\\"}\"]", NULL);