[PATCH 6/6] virjsontest: Introduce a test case for an empty array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mprivozn@xxxxxxxxxx>
---
 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);
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux