From 148b7aa7e2470e835969d722598c960919a04574 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 24 Aug 2023 09:56:25 +0200 Subject: [PATCH] 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 --- tests/virjsontest.c | 1 + 1 file changed, 1 insertion(+) 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);