tests/qapi-schema: Cover duplicate 'Features:' line
We don't actually recognize the second 'Features:' line. Instead, we treat it as an untagged section. If it was followed by feature description, we'd reject that like "description of '@feat2:' follows a section". Less than clear. To be improved shortly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240216145841.2099240-3-armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
976474fdb2
commit
fc68b9ffc9
0
tests/qapi-schema/doc-duplicate-features.err
Normal file
0
tests/qapi-schema/doc-duplicate-features.err
Normal file
11
tests/qapi-schema/doc-duplicate-features.json
Normal file
11
tests/qapi-schema/doc-duplicate-features.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Duplicate 'Features:' line
|
||||||
|
|
||||||
|
##
|
||||||
|
# @foo:
|
||||||
|
#
|
||||||
|
# Features:
|
||||||
|
# @feat: mumble
|
||||||
|
#
|
||||||
|
# Features:
|
||||||
|
##
|
||||||
|
{ 'command': 'foo', 'features': ['feat'] }
|
22
tests/qapi-schema/doc-duplicate-features.out
Normal file
22
tests/qapi-schema/doc-duplicate-features.out
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
module ./builtin
|
||||||
|
object q_empty
|
||||||
|
enum QType
|
||||||
|
prefix QTYPE
|
||||||
|
member none
|
||||||
|
member qnull
|
||||||
|
member qnum
|
||||||
|
member qstring
|
||||||
|
member qdict
|
||||||
|
member qlist
|
||||||
|
member qbool
|
||||||
|
module doc-duplicate-features.json
|
||||||
|
command foo None -> None
|
||||||
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
|
feature feat
|
||||||
|
doc symbol=foo
|
||||||
|
body=
|
||||||
|
|
||||||
|
feature=feat
|
||||||
|
mumble
|
||||||
|
section=None
|
||||||
|
Features:
|
@ -66,6 +66,7 @@ schemas = [
|
|||||||
'doc-bad-union-member.json',
|
'doc-bad-union-member.json',
|
||||||
'doc-before-include.json',
|
'doc-before-include.json',
|
||||||
'doc-before-pragma.json',
|
'doc-before-pragma.json',
|
||||||
|
'doc-duplicate-features.json',
|
||||||
'doc-duplicated-arg.json',
|
'doc-duplicated-arg.json',
|
||||||
'doc-duplicated-return.json',
|
'doc-duplicated-return.json',
|
||||||
'doc-duplicated-since.json',
|
'doc-duplicated-since.json',
|
||||||
|
Loading…
Reference in New Issue
Block a user