Prechádzať zdrojové kódy

tests/qapi-schema: Cover two more syntax errors

Syntax error coverage should now be complete.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster 10 rokov pred
rodič
commit
91f9816da4

+ 1 - 0
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 \

+ 1 - 0
tests/qapi-schema/leading-comma-list.err

@@ -0,0 +1 @@
+tests/qapi-schema/leading-comma-list.json:2:13: Expected "{", "[", "]", string, boolean or "null"

+ 1 - 0
tests/qapi-schema/leading-comma-list.exit

@@ -0,0 +1 @@
+1

+ 2 - 0
tests/qapi-schema/leading-comma-list.json

@@ -0,0 +1,2 @@
+{ 'enum': 'Status',
+  'data': [ , 'good', 'bad', 'ugly' ] }

+ 0 - 0
tests/qapi-schema/leading-comma-list.out


+ 1 - 0
tests/qapi-schema/leading-comma-object.err

@@ -0,0 +1 @@
+tests/qapi-schema/leading-comma-object.json:1:3: Expected string or "}"

+ 1 - 0
tests/qapi-schema/leading-comma-object.exit

@@ -0,0 +1 @@
+1

+ 2 - 0
tests/qapi-schema/leading-comma-object.json

@@ -0,0 +1,2 @@
+{ , 'enum': 'Status',
+  'data': [ 'good', 'bad', 'ugly' ] }

+ 0 - 0
tests/qapi-schema/leading-comma-object.out