aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2018-01-11 22:01:17 +0200
committerMichael S. Tsirkin <mst@redhat.com>2018-01-11 22:03:50 +0200
commitacc95bc85036c443da8bf7159a77edf9f00dcd80 (patch)
tree21965c6e60a2e29664b7685e52feacdb6a86e0bd /tests/qapi-schema
parent880b1ffe6ec2f0ae25cc4175716227ad275e8b8a (diff)
parent997eba28a3ed5400a80f754bf3a1c8044b75b9ff (diff)
downloadqemu-acc95bc85036c443da8bf7159a77edf9f00dcd80.zip
qemu-acc95bc85036c443da8bf7159a77edf9f00dcd80.tar.gz
qemu-acc95bc85036c443da8bf7159a77edf9f00dcd80.tar.bz2
Merge remote-tracking branch 'origin/master' into HEAD
Resolve conflicts around apb. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tests/qapi-schema')
-rw-r--r--tests/qapi-schema/doc-bad-section.err0
-rw-r--r--tests/qapi-schema/doc-bad-section.exit1
-rw-r--r--tests/qapi-schema/doc-bad-section.json11
-rw-r--r--tests/qapi-schema/doc-bad-section.out13
-rw-r--r--tests/qapi-schema/doc-good.json1
-rw-r--r--tests/qapi-schema/doc-good.out4
-rw-r--r--tests/qapi-schema/doc-good.texi11
-rw-r--r--tests/qapi-schema/test-qapi.py6
8 files changed, 31 insertions, 16 deletions
diff --git a/tests/qapi-schema/doc-bad-section.err b/tests/qapi-schema/doc-bad-section.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/qapi-schema/doc-bad-section.err
diff --git a/tests/qapi-schema/doc-bad-section.exit b/tests/qapi-schema/doc-bad-section.exit
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/qapi-schema/doc-bad-section.exit
@@ -0,0 +1 @@
+0
diff --git a/tests/qapi-schema/doc-bad-section.json b/tests/qapi-schema/doc-bad-section.json
new file mode 100644
index 0000000..560df4b
--- /dev/null
+++ b/tests/qapi-schema/doc-bad-section.json
@@ -0,0 +1,11 @@
+# = section within an expression comment
+# BUG: not rejected
+
+##
+# @Enum:
+# == Produces *invalid* texinfo
+# @one: The _one_ {and only}
+#
+# @two is undocumented
+##
+{ 'enum': 'Enum', 'data': [ 'one', 'two' ] }
diff --git a/tests/qapi-schema/doc-bad-section.out b/tests/qapi-schema/doc-bad-section.out
new file mode 100644
index 0000000..089bde1
--- /dev/null
+++ b/tests/qapi-schema/doc-bad-section.out
@@ -0,0 +1,13 @@
+enum Enum ['one', 'two']
+enum QType ['none', 'qnull', 'qnum', 'qstring', 'qdict', 'qlist', 'qbool']
+ prefix QTYPE
+object q_empty
+doc symbol=Enum
+ body=
+== Produces *invalid* texinfo
+ arg=one
+The _one_ {and only}
+ arg=two
+
+ section=None
+@two is undocumented
diff --git a/tests/qapi-schema/doc-good.json b/tests/qapi-schema/doc-good.json
index cfdc0a8..97ab462 100644
--- a/tests/qapi-schema/doc-good.json
+++ b/tests/qapi-schema/doc-good.json
@@ -51,7 +51,6 @@
##
# @Enum:
-# == Produces *invalid* texinfo
# @one: The _one_ {and only}
#
# @two is undocumented
diff --git a/tests/qapi-schema/doc-good.out b/tests/qapi-schema/doc-good.out
index 63ca25a..1d2c250 100644
--- a/tests/qapi-schema/doc-good.out
+++ b/tests/qapi-schema/doc-good.out
@@ -77,12 +77,12 @@ Examples:
- {braces}
doc symbol=Enum
body=
-== Produces *invalid* texinfo
+
arg=one
The _one_ {and only}
arg=two
- section=
+ section=None
@two is undocumented
doc symbol=Base
body=
diff --git a/tests/qapi-schema/doc-good.texi b/tests/qapi-schema/doc-good.texi
index c410626..1778312 100644
--- a/tests/qapi-schema/doc-good.texi
+++ b/tests/qapi-schema/doc-good.texi
@@ -76,7 +76,7 @@ Examples:
@deftp {Enum} Enum
-@subsection Produces @strong{invalid} texinfo
+
@b{Values:}
@table @asis
@@ -101,7 +101,6 @@ Not documented
the first member
@end table
-
@end deftp
@@ -118,7 +117,6 @@ Another paragraph (but no @code{var}: line)
Not documented
@end table
-
@end deftp
@@ -127,7 +125,6 @@ Not documented
-
@end deftp
@@ -143,7 +140,6 @@ Not documented
@item The members of @code{Variant2} when @code{base1} is @t{"two"}
@end table
-
@end deftp
@@ -160,7 +156,6 @@ One of @t{"one"}, @t{"two"}
@item @code{data: Variant2} when @code{type} is @t{"two"}
@end table
-
@end deftp
@@ -182,7 +177,6 @@ argument
Not documented
@end table
-
@b{Note:}
@code{arg3} is undocumented
@@ -209,14 +203,12 @@ Duis aute irure dolor
<- out
@end example
-
@b{Examples:}
@example
- *verbatim*
- @{braces@}
@end example
-
@b{Since:}
2.10
@@ -237,7 +229,6 @@ If you're bored enough to read this, go see a video of boxed cats
<- out
@end example
-
@end deftypefn
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index c7724d3..fe0ca08 100644
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -61,8 +61,8 @@ for doc in schema.docs:
print 'doc symbol=%s' % doc.symbol
else:
print 'doc freeform'
- print ' body=\n%s' % doc.body
+ print ' body=\n%s' % doc.body.text
for arg, section in doc.args.iteritems():
- print ' arg=%s\n%s' % (arg, section)
+ print ' arg=%s\n%s' % (arg, section.text)
for section in doc.sections:
- print ' section=%s\n%s' % (section.name, section)
+ print ' section=%s\n%s' % (section.name, section.text)