From 91f9816da4d505d379753896f3f7b6abb910324b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 31 Aug 2015 15:47:55 +0200 Subject: tests/qapi-schema: Cover two more syntax errors Syntax error coverage should now be complete. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/Makefile | 1 + tests/qapi-schema/leading-comma-list.err | 1 + tests/qapi-schema/leading-comma-list.exit | 1 + tests/qapi-schema/leading-comma-list.json | 2 ++ tests/qapi-schema/leading-comma-list.out | 0 tests/qapi-schema/leading-comma-object.err | 1 + tests/qapi-schema/leading-comma-object.exit | 1 + tests/qapi-schema/leading-comma-object.json | 2 ++ tests/qapi-schema/leading-comma-object.out | 0 9 files changed, 9 insertions(+) create mode 100644 tests/qapi-schema/leading-comma-list.err create mode 100644 tests/qapi-schema/leading-comma-list.exit create mode 100644 tests/qapi-schema/leading-comma-list.json create mode 100644 tests/qapi-schema/leading-comma-list.out create mode 100644 tests/qapi-schema/leading-comma-object.err create mode 100644 tests/qapi-schema/leading-comma-object.exit create mode 100644 tests/qapi-schema/leading-comma-object.json create mode 100644 tests/qapi-schema/leading-comma-object.out diff --git a/tests/Makefile b/tests/Makefile index b8d445e..597ca90 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -237,6 +237,7 @@ check-qapi-schema-y := $(addprefix tests/qapi-schema/, \ missing-colon.json missing-comma-list.json missing-comma-object.json \ nested-struct-data.json non-objects.json \ qapi-schema-test.json quoted-structural-chars.json \ + leading-comma-list.json leading-comma-object.json \ trailing-comma-list.json trailing-comma-object.json \ unclosed-list.json unclosed-object.json unclosed-string.json \ duplicate-key.json union-invalid-base.json union-bad-branch.json \ diff --git a/tests/qapi-schema/leading-comma-list.err b/tests/qapi-schema/leading-comma-list.err new file mode 100644 index 0000000..f5c870b --- /dev/null +++ b/tests/qapi-schema/leading-comma-list.err @@ -0,0 +1 @@ +tests/qapi-schema/leading-comma-list.json:2:13: Expected "{", "[", "]", string, boolean or "null" diff --git a/tests/qapi-schema/leading-comma-list.exit b/tests/qapi-schema/leading-comma-list.exit new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/qapi-schema/leading-comma-list.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/leading-comma-list.json b/tests/qapi-schema/leading-comma-list.json new file mode 100644 index 0000000..c5ba501 --- /dev/null +++ b/tests/qapi-schema/leading-comma-list.json @@ -0,0 +1,2 @@ +{ 'enum': 'Status', + 'data': [ , 'good', 'bad', 'ugly' ] } diff --git a/tests/qapi-schema/leading-comma-list.out b/tests/qapi-schema/leading-comma-list.out new file mode 100644 index 0000000..e69de29 diff --git a/tests/qapi-schema/leading-comma-object.err b/tests/qapi-schema/leading-comma-object.err new file mode 100644 index 0000000..f767b95 --- /dev/null +++ b/tests/qapi-schema/leading-comma-object.err @@ -0,0 +1 @@ +tests/qapi-schema/leading-comma-object.json:1:3: Expected string or "}" diff --git a/tests/qapi-schema/leading-comma-object.exit b/tests/qapi-schema/leading-comma-object.exit new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/qapi-schema/leading-comma-object.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/leading-comma-object.json b/tests/qapi-schema/leading-comma-object.json new file mode 100644 index 0000000..c89023f --- /dev/null +++ b/tests/qapi-schema/leading-comma-object.json @@ -0,0 +1,2 @@ +{ , 'enum': 'Status', + 'data': [ 'good', 'bad', 'ugly' ] } diff --git a/tests/qapi-schema/leading-comma-object.out b/tests/qapi-schema/leading-comma-object.out new file mode 100644 index 0000000..e69de29 -- cgit v1.1