提交 cdf82b60 编写于 作者: P Peter Krempa

jsontest: Add test cases for deflattening of arrays

Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 070310a6
{
"valid": {
"0": "test",
"1": { "something": 123 },
"2": true
},
"outoforder": {
"1": { "something": 123 },
"2": true,
"0": "test"
},
"invalid-overflow": {
"1": { "something": 123 },
"2": true,
"4": "test"
},
"invalid-strings": {
"1": { "something": 123 },
"2": true,
"test": "test"
},
"nestedkeys": {
"test.0.test": 123,
"test.2.test": 123,
"test.1.test": 123
}
}
{
"valid": [
"test",
{
"something": 123
},
true
],
"outoforder": [
"test",
{
"something": 123
},
true
],
"invalid-overflow": {
"1": {
"something": 123
},
"2": true,
"4": "test"
},
"invalid-strings": {
"1": {
"something": 123
},
"2": true,
"test": "test"
},
"nestedkeys": {
"test": [
{
"test": 123
},
{
"test": 123
},
{
"test": 123
}
]
}
}
...@@ -609,6 +609,7 @@ mymain(void) ...@@ -609,6 +609,7 @@ mymain(void)
DO_TEST_DEFLATTEN("concat", true); DO_TEST_DEFLATTEN("concat", true);
DO_TEST_DEFLATTEN("concat-double-key", false); DO_TEST_DEFLATTEN("concat-double-key", false);
DO_TEST_DEFLATTEN("qemu-sheepdog", true); DO_TEST_DEFLATTEN("qemu-sheepdog", true);
DO_TEST_DEFLATTEN("dotted-array", true);
return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE; return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册