]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/qapi-schema: Cover unknown pragma
authorMarkus Armbruster <armbru@redhat.com>
Sat, 14 Sep 2019 15:34:48 +0000 (17:34 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 24 Sep 2019 12:07:22 +0000 (14:07 +0200)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190914153506.2151-2-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/Makefile.include
tests/qapi-schema/pragma-unknown.err [new file with mode: 0644]
tests/qapi-schema/pragma-unknown.exit [new file with mode: 0644]
tests/qapi-schema/pragma-unknown.json [new file with mode: 0644]
tests/qapi-schema/pragma-unknown.out [new file with mode: 0644]

index 2c3adb15307f49b2ecbdf62f59465b86010c316f..089cc3ea9574cc0949659f21c6e2e137e97f0eb7 100644 (file)
@@ -427,6 +427,7 @@ qapi-schema += pragma-doc-required-crap.json
 qapi-schema += pragma-extra-junk.json
 qapi-schema += pragma-name-case-whitelist-crap.json
 qapi-schema += pragma-non-dict.json
+qapi-schema += pragma-unknown.json
 qapi-schema += pragma-returns-whitelist-crap.json
 qapi-schema += qapi-schema-test.json
 qapi-schema += quoted-structural-chars.json
diff --git a/tests/qapi-schema/pragma-unknown.err b/tests/qapi-schema/pragma-unknown.err
new file mode 100644 (file)
index 0000000..6ef2058
--- /dev/null
@@ -0,0 +1 @@
+tests/qapi-schema/pragma-unknown.json:1: Unknown pragma 'no-such-pragma'
diff --git a/tests/qapi-schema/pragma-unknown.exit b/tests/qapi-schema/pragma-unknown.exit
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/qapi-schema/pragma-unknown.json b/tests/qapi-schema/pragma-unknown.json
new file mode 100644 (file)
index 0000000..c51bbbb
--- /dev/null
@@ -0,0 +1 @@
+{ 'pragma': { 'no-such-pragma': false } }
diff --git a/tests/qapi-schema/pragma-unknown.out b/tests/qapi-schema/pragma-unknown.out
new file mode 100644 (file)
index 0000000..e69de29