diff options
Diffstat (limited to 'tests')
21 files changed, 32 insertions, 0 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include index 346345e84d..7a58c12a7e 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -381,6 +381,7 @@ qapi-schema += doc-invalid-end2.json qapi-schema += doc-invalid-return.json qapi-schema += doc-invalid-section.json qapi-schema += doc-invalid-start.json +qapi-schema += doc-missing.json qapi-schema += doc-missing-colon.json qapi-schema += doc-missing-expr.json qapi-schema += doc-missing-space.json @@ -422,6 +423,7 @@ qapi-schema += funny-char.json qapi-schema += ident-with-escape.json qapi-schema += include-before-err.json qapi-schema += include-cycle.json +qapi-schema += include-extra-junk.json qapi-schema += include-format-err.json qapi-schema += include-nested-err.json qapi-schema += include-no-file.json @@ -439,6 +441,9 @@ qapi-schema += missing-comma-object.json qapi-schema += missing-type.json qapi-schema += nested-struct-data.json qapi-schema += non-objects.json +qapi-schema += pragma-doc-required-crap.json +qapi-schema += pragma-extra-junk.json +qapi-schema += pragma-non-dict.json qapi-schema += qapi-schema-test.json qapi-schema += quoted-structural-chars.json qapi-schema += redefined-builtin.json diff --git a/tests/qapi-schema/doc-missing.err b/tests/qapi-schema/doc-missing.err new file mode 100644 index 0000000000..7f2f326b30 --- /dev/null +++ b/tests/qapi-schema/doc-missing.err @@ -0,0 +1 @@ +tests/qapi-schema/doc-missing.json:5: Expression missing documentation comment diff --git a/tests/qapi-schema/doc-missing.exit b/tests/qapi-schema/doc-missing.exit new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/tests/qapi-schema/doc-missing.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/doc-missing.json b/tests/qapi-schema/doc-missing.json new file mode 100644 index 0000000000..5956709742 --- /dev/null +++ b/tests/qapi-schema/doc-missing.json @@ -0,0 +1,5 @@ +# Expression documentation required + +{ 'pragma': { 'doc-required': true } } + +{ 'command': 'undocumented' } diff --git a/tests/qapi-schema/doc-missing.out b/tests/qapi-schema/doc-missing.out new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/qapi-schema/doc-missing.out diff --git a/tests/qapi-schema/include-extra-junk.err b/tests/qapi-schema/include-extra-junk.err new file mode 100644 index 0000000000..e6ef2a3720 --- /dev/null +++ b/tests/qapi-schema/include-extra-junk.err @@ -0,0 +1 @@ +tests/qapi-schema/include-extra-junk.json:3: Invalid 'include' directive diff --git a/tests/qapi-schema/include-extra-junk.exit b/tests/qapi-schema/include-extra-junk.exit new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/tests/qapi-schema/include-extra-junk.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/include-extra-junk.json b/tests/qapi-schema/include-extra-junk.json new file mode 100644 index 0000000000..25fe85078d --- /dev/null +++ b/tests/qapi-schema/include-extra-junk.json @@ -0,0 +1,3 @@ +# 'include' must be the sole member + +{ 'include': 'comments.json', 'junk': true } diff --git a/tests/qapi-schema/include-extra-junk.out b/tests/qapi-schema/include-extra-junk.out new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/qapi-schema/include-extra-junk.out diff --git a/tests/qapi-schema/pragma-doc-required-crap.err b/tests/qapi-schema/pragma-doc-required-crap.err new file mode 100644 index 0000000000..39cd56cd48 --- /dev/null +++ b/tests/qapi-schema/pragma-doc-required-crap.err @@ -0,0 +1 @@ +tests/qapi-schema/pragma-doc-required-crap.json:3: Pragma 'doc-required' must be boolean diff --git a/tests/qapi-schema/pragma-doc-required-crap.exit b/tests/qapi-schema/pragma-doc-required-crap.exit new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/tests/qapi-schema/pragma-doc-required-crap.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/pragma-doc-required-crap.json b/tests/qapi-schema/pragma-doc-required-crap.json new file mode 100644 index 0000000000..ed763c5ffc --- /dev/null +++ b/tests/qapi-schema/pragma-doc-required-crap.json @@ -0,0 +1,3 @@ +# 'doc-required' must be bool + +{ 'pragma': { 'doc-required': {} } } diff --git a/tests/qapi-schema/pragma-doc-required-crap.out b/tests/qapi-schema/pragma-doc-required-crap.out new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/qapi-schema/pragma-doc-required-crap.out diff --git a/tests/qapi-schema/pragma-extra-junk.err b/tests/qapi-schema/pragma-extra-junk.err new file mode 100644 index 0000000000..4481688dbf --- /dev/null +++ b/tests/qapi-schema/pragma-extra-junk.err @@ -0,0 +1 @@ +tests/qapi-schema/pragma-extra-junk.json:3: Invalid 'pragma' directive diff --git a/tests/qapi-schema/pragma-extra-junk.exit b/tests/qapi-schema/pragma-extra-junk.exit new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/tests/qapi-schema/pragma-extra-junk.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/pragma-extra-junk.json b/tests/qapi-schema/pragma-extra-junk.json new file mode 100644 index 0000000000..ba38ef2e95 --- /dev/null +++ b/tests/qapi-schema/pragma-extra-junk.json @@ -0,0 +1,3 @@ +# 'pragma' must be the sole member + +{ 'pragma': { 'doc-required': true }, 'junk': true } diff --git a/tests/qapi-schema/pragma-extra-junk.out b/tests/qapi-schema/pragma-extra-junk.out new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/qapi-schema/pragma-extra-junk.out diff --git a/tests/qapi-schema/pragma-non-dict.err b/tests/qapi-schema/pragma-non-dict.err new file mode 100644 index 0000000000..75bc335aea --- /dev/null +++ b/tests/qapi-schema/pragma-non-dict.err @@ -0,0 +1 @@ +tests/qapi-schema/pragma-non-dict.json:3: Value of 'pragma' must be a dictionary diff --git a/tests/qapi-schema/pragma-non-dict.exit b/tests/qapi-schema/pragma-non-dict.exit new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/tests/qapi-schema/pragma-non-dict.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/pragma-non-dict.json b/tests/qapi-schema/pragma-non-dict.json new file mode 100644 index 0000000000..60fcc79bdb --- /dev/null +++ b/tests/qapi-schema/pragma-non-dict.json @@ -0,0 +1,3 @@ +# Value of 'pragma' must be a dictionary + +{ 'pragma': [] } diff --git a/tests/qapi-schema/pragma-non-dict.out b/tests/qapi-schema/pragma-non-dict.out new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/qapi-schema/pragma-non-dict.out |