summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser/gtkdoc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scanner/annotationparser/gtkdoc')
-rw-r--r--tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml482
-rw-r--r--tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml39
-rw-r--r--tests/scanner/annotationparser/gtkdoc/bugs/tester.c.xml1108
-rw-r--r--tests/scanner/annotationparser/gtkdoc/bugs/tester.h.xml925
-rw-r--r--tests/scanner/annotationparser/gtkdoc/empty/tester.c.xml72
-rw-r--r--tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml216
-rw-r--r--tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml281
-rw-r--r--tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml197
-rw-r--r--tests/scanner/annotationparser/gtkdoc/gobject/giface.h.xml162
-rw-r--r--tests/scanner/annotationparser/gtkdoc/gobject/gobject.c.xml616
-rw-r--r--tests/scanner/annotationparser/gtkdoc/gobject/gobject.h.xml213
-rw-r--r--tests/scanner/annotationparser/gtkdoc/gobject/gtypes.c.xml46
-rw-r--r--tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml113
13 files changed, 4470 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml
new file mode 100644
index 00000000..d28d5d9b
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml
@@ -0,0 +1,482 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input>/**
+ * SECTION:tester
+ * @short_description: module for gtk-doc unit test
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:tester</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>module for gtk-doc unit test</description>
+ </parameter>
+ </parameters>
+ <description>This file contains non-sense code for the sole purpose of testing the docs.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * SECTION:tester
+ * @short_description: module for gtk-doc unit test
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * annotation_array_length:
+ * @list: a #GtkListStore
+ * @n_columns: number of columns
+ * @types: (array length=n_columns): list of types
+ *
+ * Document parameter relation for array length.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_array_length</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>list</name>
+ <description>a #GtkListStore</description>
+ </parameter>
+ <parameter>
+ <name>n_columns</name>
+ <description>number of columns</description>
+ </parameter>
+ <parameter>
+ <name>types</name>
+ <annotations>
+ <annotation>
+ <name>array</name>
+ <options>
+ <option>
+ <name>length</name>
+ <value>n_columns</value>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>list of types</description>
+ </parameter>
+ </parameters>
+ <description>Document parameter relation for array length.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_array_length:
+ * @list: a #GtkListStore
+ * @n_columns: number of columns
+ * @types: (array length=n_columns): list of types
+ *
+ * Document parameter relation for array length.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * annotation_nullable:
+ * @uri: a uri
+ * @label: (allow-none): an optional string, which is used in ways too
+ * complicated to describe in a single line, making it necessary to wrap it
+ *
+ * Document optional parameters.
+ *
+ * Returns: (transfer full) (allow-none): Returns stuff which you have to
+ * free after use, whose description is also rather long
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_nullable</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>uri</name>
+ <description>a uri</description>
+ </parameter>
+ <parameter>
+ <name>label</name>
+ <annotations>
+ <annotation>
+ <name>allow-none</name>
+ </annotation>
+ </annotations>
+ <description>an optional string, which is used in ways too
+ complicated to describe in a single line, making it necessary to wrap it</description>
+ </parameter>
+ </parameters>
+ <description>Document optional parameters.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>full</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>allow-none</name>
+ </annotation>
+ </annotations>
+ <description>Returns stuff which you have to
+ free after use, whose description is also rather long</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_nullable:
+ * @uri: a uri
+ * @label: (allow-none): an optional string, which is used in ways too
+ * complicated to describe in a single line, making it necessary to wrap it
+ *
+ * Document optional parameters.
+ *
+ * Returns: (transfer full) (allow-none): Returns stuff which you have to
+ * free after use, whose description is also rather long
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * annotation_elementtype:
+ * @list: (element-type GObject): list of #GObject instances to search
+ *
+ * Document optional parameters.
+ *
+ * Returns: %TRUE for success
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_elementtype</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>list</name>
+ <annotations>
+ <annotation>
+ <name>element-type</name>
+ <options>
+ <option>
+ <name>GObject</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>list of #GObject instances to search</description>
+ </parameter>
+ </parameters>
+ <description>Document optional parameters.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>%TRUE for success</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_elementtype:
+ * @list: (element-type GObject): list of #GObject instances to search
+ *
+ * Document optional parameters.
+ *
+ * Returns: %TRUE for success
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * annotation_elementtype_transfer:
+ * @list: (element-type utf8) (transfer full): list of #GObject instances to search
+ *
+ * Document optional parameters.
+ *
+ * Returns: %TRUE for success
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_elementtype_transfer</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>list</name>
+ <annotations>
+ <annotation>
+ <name>element-type</name>
+ <options>
+ <option>
+ <name>utf8</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>full</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>list of #GObject instances to search</description>
+ </parameter>
+ </parameters>
+ <description>Document optional parameters.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>%TRUE for success</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_elementtype_transfer:
+ * @list: (element-type utf8) (transfer full): list of #GObject instances to search
+ *
+ * Document optional parameters.
+ *
+ * Returns: %TRUE for success
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * annotation_elementtype_returns:
+ *
+ * Document optional parameters.
+ *
+ * Returns: (element-type GObject): A list of #GObject instances.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_elementtype_returns</name>
+ </identifier>
+ <description>Document optional parameters.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>element-type</name>
+ <options>
+ <option>
+ <name>GObject</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>A list of #GObject instances.</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_elementtype_returns:
+ *
+ * Document optional parameters.
+ *
+ * Returns: (element-type GObject): A list of #GObject instances.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * annotation_outparams:
+ * @list: (out) (transfer none): a pointer to take a list
+ *
+ * Document optional parameters.
+ *
+ * Returns: %TRUE for success
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_outparams</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>list</name>
+ <annotations>
+ <annotation>
+ <name>out</name>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>none</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>a pointer to take a list</description>
+ </parameter>
+ </parameters>
+ <description>Document optional parameters.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>%TRUE for success</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_outparams:
+ * @list: (out) (transfer none): a pointer to take a list
+ *
+ * Document optional parameters.
+ *
+ * Returns: %TRUE for success
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * annotation_skip: (skip)
+ * @list: a pointer to take a list
+ *
+ * Documentation for this function.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_skip</name>
+ <annotations>
+ <annotation>
+ <name>skip</name>
+ </annotation>
+ </annotations>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>list</name>
+ <description>a pointer to take a list</description>
+ </parameter>
+ </parameters>
+ <description>Documentation for this function.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_skip: (skip)
+ * @list: a pointer to take a list
+ *
+ * Documentation for this function.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * annotation_skip_return: (skip)
+ * @list: a pointer to take a list
+ *
+ * Documentation for this function.
+ *
+ * Returns: (skip): %TRUE for success
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_skip_return</name>
+ <annotations>
+ <annotation>
+ <name>skip</name>
+ </annotation>
+ </annotations>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>list</name>
+ <description>a pointer to take a list</description>
+ </parameter>
+ </parameters>
+ <description>Documentation for this function.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>skip</name>
+ </annotation>
+ </annotations>
+ <description>%TRUE for success</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_skip_return: (skip)
+ * @list: a pointer to take a list
+ *
+ * Documentation for this function.
+ *
+ * Returns: (skip): %TRUE for success
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * annotation_scope:
+ * @callback: (scope async): a callback
+ * @user_data: data to pass to callback
+ *
+ * Documentation for this function.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_scope</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>callback</name>
+ <annotations>
+ <annotation>
+ <name>scope</name>
+ <options>
+ <option>
+ <name>async</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>a callback</description>
+ </parameter>
+ <parameter>
+ <name>user_data</name>
+ <description>data to pass to callback</description>
+ </parameter>
+ </parameters>
+ <description>Documentation for this function.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_scope:
+ * @callback: (scope async): a callback
+ * @user_data: data to pass to callback
+ *
+ * Documentation for this function.
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml b/tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml
new file mode 100644
index 00000000..0917cd95
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input>/**
+ * GtkdocAnnotation:
+ * @that: (allow-none): eventualy points to something
+ *
+ * small struct
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocAnnotation</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>that</name>
+ <annotations>
+ <annotation>
+ <name>allow-none</name>
+ </annotation>
+ </annotations>
+ <description>eventualy points to something</description>
+ </parameter>
+ </parameters>
+ <description>small struct</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocAnnotation:
+ * @that: (allow-none): eventualy points to something
+ *
+ * small struct
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/bugs/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/bugs/tester.c.xml
new file mode 100644
index 00000000..09ab9773
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/bugs/tester.c.xml
@@ -0,0 +1,1108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input><![CDATA[/**
+ * SECTION:tester
+ * @short_description: module for gtk-doc unit test
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ *
+ * As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
+ * returns nothing.
+ *
+ * Some special characters need escaping. The tests should pass 100\%.
+ * Try a <ulink url="http://www.gtk.org/gtk-doc/#Top">link containing a # char</ulink>.
+ *
+ * <refsect2 id="dummy-id">
+ * <title>more details</title>
+ * <para>
+ * Second paragraph inside subsection.
+ * </para>
+ * </refsect2>
+ */]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:tester</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>module for gtk-doc unit test</description>
+ </parameter>
+ </parameters>
+ <description><![CDATA[This file contains non-sense code for the sole purpose of testing the docs.
+
+As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
+returns nothing.
+
+Some special characters need escaping. The tests should pass 100\%.
+Try a <ulink url="http://www.gtk.org/gtk-doc/#Top">link containing a # char</ulink>.
+
+<refsect2 id="dummy-id">
+<title>more details</title>
+<para>
+Second paragraph inside subsection.
+</para>
+</refsect2>]]></description>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * SECTION:tester
+ * @short_description: module for gtk-doc unit test
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ *
+ * As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
+ * returns nothing.
+ *
+ * Some special characters need escaping. The tests should pass 100\%.
+ * Try a <ulink url="http://www.gtk.org/gtk-doc/#Top">link containing a # char</ulink>.
+ *
+ * <refsect2 id="dummy-id">
+ * <title>more details</title>
+ * <para>
+ * Second paragraph inside subsection.
+ * </para>
+ * </refsect2>
+ */]]></output>
+</test>
+
+<test>
+ <input>/**
+ * bug_141869_a:
+ * @pid: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=141869
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_141869_a</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>pid</name>
+ <description>arg</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=141869</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_141869_a:
+ * @pid: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=141869
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_141869_b:
+ * @pid: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=141869
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_141869_b</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>pid</name>
+ <description>arg</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=141869</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_141869_b:
+ * @pid: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=141869
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_379466:
+ * @pid: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=379466
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_379466</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>pid</name>
+ <description>arg</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=379466</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_379466:
+ * @pid: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=379466
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_380824:
+ * @arg: arg
+ *
+ * Returns a value.
+ * http://bugzilla.gnome.org/show_bug.cgi?id=380824
+ *
+ * Since: 0.1
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_380824</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>arg</name>
+ <description>arg</description>
+ </parameter>
+ </parameters>
+ <description>Returns a value.
+http://bugzilla.gnome.org/show_bug.cgi?id=380824</description>
+ <tags>
+ <tag>
+ <name>since</name>
+ <value>0.1</value>
+ </tag>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_380824:
+ * @arg: arg
+ *
+ * Returns a value.
+ * http://bugzilla.gnome.org/show_bug.cgi?id=380824
+ *
+ * Since: 0.1
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_411739:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=411739
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_411739</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=411739</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_411739:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=411739
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_419997:
+ * @const_values: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=419997
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_419997</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>const_values</name>
+ <description>arg</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=419997</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_419997:
+ * @const_values: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=419997
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_445693:
+ * @pid: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=445693
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_445693</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>pid</name>
+ <description>arg</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=445693</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_445693:
+ * @pid: arg
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=445693
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_471014:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=471014
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_471014</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=471014</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_471014:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=471014
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * Bug446648:
+ * @BUG_446648_FOO: foo
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=446648
+ **/</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>Bug446648</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>BUG_446648_FOO</name>
+ <description>foo</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=446648</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * Bug446648:
+ * @BUG_446648_FOO: foo
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=446648
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_552602:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=552602
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_552602</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=552602</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_552602:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=552602
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_574654a:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=574654
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_574654a</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=574654</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_574654a:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=574654
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_574654b:
+ * @offset: skip this many items
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=574654
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_574654b</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>offset</name>
+ <description>skip this many items</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=574654</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_574654b:
+ * @offset: skip this many items
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=574654
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_580300a_get_type:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=580300
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_580300a_get_type</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=580300</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_580300a_get_type:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=580300
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_580300b_get_type:
+ * @a: value
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=580300
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_580300b_get_type</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>value</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=580300</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_580300b_get_type:
+ * @a: value
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=580300
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_580300c_get_type:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=580300
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_580300c_get_type</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=580300</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_580300c_get_type:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=580300
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_580300d_get_type:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=580300
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_580300d_get_type</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=580300</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_580300d_get_type:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=580300
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_597937:
+ * @function_arg: value
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=597937
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_597937</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>function_arg</name>
+ <description>value</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=597937</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_597937:
+ * @function_arg: value
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=597937
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_602518a:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=602518
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_602518a</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=602518</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_602518a:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=602518
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_602518b:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=602518
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_602518b</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=602518</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_602518b:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=602518
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_602518c:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=602518
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_602518c</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=602518</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_602518c:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=602518
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_607445:
+ * @a: parameter
+ * @n: parameter
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=607445
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_607445</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>parameter</description>
+ </parameter>
+ <parameter>
+ <name>n</name>
+ <description>parameter</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=607445</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_607445:
+ * @a: parameter
+ * @n: parameter
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=607445
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_610257:
+ * @der: parameter
+ * @len: parameter
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=610257
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_610257</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>der</name>
+ <description>parameter</description>
+ </parameter>
+ <parameter>
+ <name>len</name>
+ <description>parameter</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=610257</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_610257:
+ * @der: parameter
+ * @len: parameter
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=610257
+ */</output>
+</test>
+
+<test>
+ <input><![CDATA[/**
+ * bug_623968a:
+ *
+ * <para>test</para>
+ * <refsect3>
+ * <title>subsect</title>
+ * <para>test</para>
+ * </refsect3>
+ **/]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_623968a</name>
+ </identifier>
+ <description><![CDATA[<para>test</para>
+<refsect3>
+ <title>subsect</title>
+ <para>test</para>
+</refsect3>]]></description>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * bug_623968a:
+ *
+ * <para>test</para>
+ * <refsect3>
+ * <title>subsect</title>
+ * <para>test</para>
+ * </refsect3>
+ */]]></output>
+</test>
+
+<test>
+ <input><![CDATA[/**
+ * bug_623968b:
+ *
+ * test
+ *
+ * <refsect3>
+ * <title>subsect</title>
+ * <para>test</para>
+ * </refsect3>
+ **/]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_623968b</name>
+ </identifier>
+ <description><![CDATA[test
+
+<refsect3>
+ <title>subsect</title>
+ <para>test</para>
+</refsect3>]]></description>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * bug_623968b:
+ *
+ * test
+ *
+ * <refsect3>
+ * <title>subsect</title>
+ * <para>test</para>
+ * </refsect3>
+ */]]></output>
+</test>
+
+<test>
+ <input><![CDATA[/**
+ * bug_623968c:
+ *
+ * <para>test</para>
+ **/]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_623968c</name>
+ </identifier>
+ <description><![CDATA[<para>test</para>]]></description>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * bug_623968c:
+ *
+ * <para>test</para>
+ */]]></output>
+</test>
+
+<test>
+ <input>/**
+ * bug_624200a:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624200
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_624200a</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=624200</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_624200a:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624200
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_624200b:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624200
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_624200b</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=624200</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_624200b:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624200
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_638330:
+ * @arg1: arg1
+ * @data: data
+ * @length: length
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=638330
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_638330</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>arg1</name>
+ <description>arg1</description>
+ </parameter>
+ <parameter>
+ <name>data</name>
+ <description>data</description>
+ </parameter>
+ <parameter>
+ <name>length</name>
+ <description>length</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=638330</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_638330:
+ * @arg1: arg1
+ * @data: data
+ * @length: length
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=638330
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_000000_va1:
+ * @name: a name
+ * @...: A printf-style message to output
+ *
+ * Outputs a message.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_000000_va1</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>name</name>
+ <description>a name</description>
+ </parameter>
+ <parameter>
+ <name>...</name>
+ <description>A printf-style message to output</description>
+ </parameter>
+ </parameters>
+ <description>Outputs a message.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_000000_va1:
+ * @name: a name
+ * @...: A printf-style message to output
+ *
+ * Outputs a message.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_624001a:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_624001a</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_624001a:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_624001b:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_624001b</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_624001b:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_624001c:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_624001c</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_624001c:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_624001d:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_624001d</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_624001d:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_624001e:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_624001e</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_624001e:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=624001
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * deprecation_notice:
+ *
+ * Foo.
+ *
+ * Deprecated: 3.10: Use named icon "bar" instead.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>deprecation_notice</name>
+ </identifier>
+ <description>Foo.</description>
+ <tags>
+ <tag>
+ <name>deprecated</name>
+ <value>3.10</value>
+ <description>Use named icon "bar" instead.</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * deprecation_notice:
+ *
+ * Foo.
+ *
+ * Deprecated: 3.10: Use named icon "bar" instead.
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/bugs/tester.h.xml b/tests/scanner/annotationparser/gtkdoc/bugs/tester.h.xml
new file mode 100644
index 00000000..5dad3cb8
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/bugs/tester.h.xml
@@ -0,0 +1,925 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input>/**
+ * Bug324535:
+ * @BUG_324535_A: enum 1
+ * @BUG_324535_B: enum 2
+ * @BUG_324535_C: enum 3
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=324535
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>Bug324535</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>BUG_324535_A</name>
+ <description>enum 1</description>
+ </parameter>
+ <parameter>
+ <name>BUG_324535_B</name>
+ <description>enum 2</description>
+ </parameter>
+ <parameter>
+ <name>BUG_324535_C</name>
+ <description>enum 3</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=324535</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * Bug324535:
+ * @BUG_324535_A: enum 1
+ * @BUG_324535_B: enum 2
+ * @BUG_324535_C: enum 3
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=324535
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_481811:
+ * @x: argument
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=481811
+ **/</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_481811</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>x</name>
+ <description>argument</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=481811</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_481811:
+ * @x: argument
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=481811
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_501038:
+ * @a: value
+ * @b: deprecated value
+ * @_b: scrambled deprecated value
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=501038
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_501038</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>value</description>
+ </parameter>
+ <parameter>
+ <name>b</name>
+ <description>deprecated value</description>
+ </parameter>
+ <parameter>
+ <name>_b</name>
+ <description>scrambled deprecated value</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=501038</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_501038:
+ * @a: value
+ * @b: deprecated value
+ * @_b: scrambled deprecated value
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=501038
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_460127:
+ * @a: field
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=460127
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_460127</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>field</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=460127</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_460127:
+ * @a: field
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=460127
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_477532:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=477532
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_477532</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=477532</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_477532:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=477532
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * Bug446648:
+ * @BUG_446648_FOO: field
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=446648
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>Bug446648</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>BUG_446648_FOO</name>
+ <description>field</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=446648</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * Bug446648:
+ * @BUG_446648_FOO: field
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=446648
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * Bug512154:
+ * @index: field
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=512154
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>Bug512154</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>index</name>
+ <description>field</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=512154</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * Bug512154:
+ * @index: field
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=512154
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_512155a_function_pointer_t:
+ * @arg1: param 1
+ * @arg2: param 1
+ * @arg3: param 1
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=512155
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_512155a_function_pointer_t</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>arg1</name>
+ <description>param 1</description>
+ </parameter>
+ <parameter>
+ <name>arg2</name>
+ <description>param 1</description>
+ </parameter>
+ <parameter>
+ <name>arg3</name>
+ <description>param 1</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=512155</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_512155a_function_pointer_t:
+ * @arg1: param 1
+ * @arg2: param 1
+ * @arg3: param 1
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=512155
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_512155b_function_pointer_t:
+ * @arg1: param 1
+ * @arg2: param 1
+ * @arg3: param 1
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=512155
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_512155b_function_pointer_t</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>arg1</name>
+ <description>param 1</description>
+ </parameter>
+ <parameter>
+ <name>arg2</name>
+ <description>param 1</description>
+ </parameter>
+ <parameter>
+ <name>arg3</name>
+ <description>param 1</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=512155</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_512155b_function_pointer_t:
+ * @arg1: param 1
+ * @arg2: param 1
+ * @arg3: param 1
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=512155
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_512155c_function_pointer_t:
+ * @arg1: param 1
+ * @arg2: param 1
+ * @arg3: param 1
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=512155
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_512155c_function_pointer_t</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>arg1</name>
+ <description>param 1</description>
+ </parameter>
+ <parameter>
+ <name>arg2</name>
+ <description>param 1</description>
+ </parameter>
+ <parameter>
+ <name>arg3</name>
+ <description>param 1</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=512155</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_512155c_function_pointer_t:
+ * @arg1: param 1
+ * @arg2: param 1
+ * @arg3: param 1
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=512155
+ */</output>
+</test>
+
+<test>
+ <input><![CDATA[/**
+ * BUG_530758:
+ *
+ * {{![CDATA[http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1]]!}}
+ *
+ * <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1">Test</ulink>
+ */]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>BUG_530758</name>
+ </identifier>
+ <description><![CDATA[{{![CDATA[http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1]]!}}
+
+<ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1">Test</ulink>]]></description>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * BUG_530758:
+ *
+ * {{![CDATA[http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1]]!}}
+ *
+ * <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1">Test</ulink>
+ */]]></output>
+</test>
+
+<test>
+ <input>/**
+ * bug_532395a:
+ * @number: a number
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=532395
+ *
+ * Returns: number
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_532395a</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>number</name>
+ <description>a number</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=532395</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>number</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_532395a:
+ * @number: a number
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=532395
+ *
+ * Returns: number
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_532395b:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=532395
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_532395b</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=532395</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_532395b:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=532395
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_544172:
+ * @self: object pointer.
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=544172
+ *
+ * Returns: result or %NULL.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_544172</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>self</name>
+ <description>object pointer.</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=544172</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result or %NULL.</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_544172:
+ * @self: object pointer.
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=544172
+ *
+ * Returns: result or %NULL.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_554833:
+ * @i: value;
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=554833
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_554833</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>i</name>
+ <description>value;</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=554833</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_554833:
+ * @i: value;
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=554833
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * bug_554833_new:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=554833
+ *
+ * Returns: result
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>bug_554833_new</name>
+ </identifier>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=554833</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>result</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * bug_554833_new:
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=554833
+ *
+ * Returns: result
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * Bug165425a:
+ * @i: data as int
+ * @f: data as float
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=165425
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>Bug165425a</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>i</name>
+ <description>data as int</description>
+ </parameter>
+ <parameter>
+ <name>f</name>
+ <description>data as float</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=165425</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * Bug165425a:
+ * @i: data as int
+ * @f: data as float
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=165425
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * Bug165425b:
+ * @i: data as int
+ * @f: data as float
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=165425
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>Bug165425b</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>i</name>
+ <description>data as int</description>
+ </parameter>
+ <parameter>
+ <name>f</name>
+ <description>data as float</description>
+ </parameter>
+ </parameters>
+ <description>http://bugzilla.gnome.org/show_bug.cgi?id=165425</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * Bug165425b:
+ * @i: data as int
+ * @f: data as float
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=165425
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * Bug642998:
+ * @red: red color intensity, from 0–255
+ * @green: green color intensity, from 0–255
+ * @blue: blue color intensity, from 0–255
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=642998
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>Bug642998</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>red</name>
+ <description>red color intensity, from 0–255</description>
+ </parameter>
+ <parameter>
+ <name>green</name>
+ <description>green color intensity, from 0–255</description>
+ </parameter>
+ <parameter>
+ <name>blue</name>
+ <description>blue color intensity, from 0–255</description>
+ </parameter>
+ </parameters>
+ <description>https://bugzilla.gnome.org/show_bug.cgi?id=642998</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * Bug642998:
+ * @red: red color intensity, from 0–255
+ * @green: green color intensity, from 0–255
+ * @blue: blue color intensity, from 0–255
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=642998
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * Bug644291:
+ * @BUG_644291_START: foo
+ * @BUG_644291_TEXT: bar
+ * @BUG_644291_END: milk
+ * @BUG_644291_ATTRIBUTE: comes
+ * @BUG_644291_XMLNS: from
+ * @BUG_644291_ASSIGN_TO: cows
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=644291
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>Bug644291</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>BUG_644291_START</name>
+ <description>foo</description>
+ </parameter>
+ <parameter>
+ <name>BUG_644291_TEXT</name>
+ <description>bar</description>
+ </parameter>
+ <parameter>
+ <name>BUG_644291_END</name>
+ <description>milk</description>
+ </parameter>
+ <parameter>
+ <name>BUG_644291_ATTRIBUTE</name>
+ <description>comes</description>
+ </parameter>
+ <parameter>
+ <name>BUG_644291_XMLNS</name>
+ <description>from</description>
+ </parameter>
+ <parameter>
+ <name>BUG_644291_ASSIGN_TO</name>
+ <description>cows</description>
+ </parameter>
+ </parameters>
+ <description>https://bugzilla.gnome.org/show_bug.cgi?id=644291</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * Bug644291:
+ * @BUG_644291_START: foo
+ * @BUG_644291_TEXT: bar
+ * @BUG_644291_END: milk
+ * @BUG_644291_ATTRIBUTE: comes
+ * @BUG_644291_XMLNS: from
+ * @BUG_644291_ASSIGN_TO: cows
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=644291
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * BUG_000000_VA2:
+ * @name: a name
+ * @...: A printf-style message to output
+ *
+ * Outputs a message.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>BUG_000000_VA2</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>name</name>
+ <description>a name</description>
+ </parameter>
+ <parameter>
+ <name>...</name>
+ <description>A printf-style message to output</description>
+ </parameter>
+ </parameters>
+ <description>Outputs a message.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * BUG_000000_VA2:
+ * @name: a name
+ * @...: A printf-style message to output
+ *
+ * Outputs a message.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * BUG_000000_VA3:
+ * @name: a name
+ * @...: A printf-style message to output
+ *
+ * Outputs a message.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>BUG_000000_VA3</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>name</name>
+ <description>a name</description>
+ </parameter>
+ <parameter>
+ <name>...</name>
+ <description>A printf-style message to output</description>
+ </parameter>
+ </parameters>
+ <description>Outputs a message.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * BUG_000000_VA3:
+ * @name: a name
+ * @...: A printf-style message to output
+ *
+ * Outputs a message.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * Bug000000Scope:
+ *
+ * Opaque structure.
+ * "warning: Field descriptions for Bug000000Scope are missing in source code comment block."
+ * but not if we remove the blank line before "int b";
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>Bug000000Scope</name>
+ </identifier>
+ <description>Opaque structure.
+"warning: Field descriptions for Bug000000Scope are missing in source code comment block."
+but not if we remove the blank line before "int b";</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * Bug000000Scope:
+ *
+ * Opaque structure.
+ * "warning: Field descriptions for Bug000000Scope are missing in source code comment block."
+ * but not if we remove the blank line before "int b";
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * gst_play_marshal_BUFFER__BOXED:
+ * @closure: test
+ * @return_value: test
+ * @marshal_data: test
+ *
+ * test.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>gst_play_marshal_BUFFER__BOXED</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>closure</name>
+ <description>test</description>
+ </parameter>
+ <parameter>
+ <name>return_value</name>
+ <description>test</description>
+ </parameter>
+ <parameter>
+ <name>marshal_data</name>
+ <description>test</description>
+ </parameter>
+ </parameters>
+ <description>test.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * gst_play_marshal_BUFFER__BOXED:
+ * @closure: test
+ * @return_value: test
+ * @marshal_data: test
+ *
+ * test.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * BUG_656773a:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=656773
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>BUG_656773a</name>
+ </identifier>
+ <description>https://bugzilla.gnome.org/show_bug.cgi?id=656773</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * BUG_656773a:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=656773
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * BUG_656773b:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=656773
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>BUG_656773b</name>
+ </identifier>
+ <description>https://bugzilla.gnome.org/show_bug.cgi?id=656773</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * BUG_656773b:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=656773
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * BUG_656773c:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=656773
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>BUG_656773c</name>
+ </identifier>
+ <description>https://bugzilla.gnome.org/show_bug.cgi?id=656773</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * BUG_656773c:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=656773
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * BUG_656946:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=656946
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>BUG_656946</name>
+ </identifier>
+ <description>https://bugzilla.gnome.org/show_bug.cgi?id=656946</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * BUG_656946:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=656946
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/empty/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/empty/tester.c.xml
new file mode 100644
index 00000000..65bda61f
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/empty/tester.c.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input><![CDATA[/**
+ * SECTION:tester
+ * @short_description: module for gtk-doc unit test
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ *
+ * As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
+ * returns nothing.
+ */]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:tester</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>module for gtk-doc unit test</description>
+ </parameter>
+ </parameters>
+ <description><![CDATA[This file contains non-sense code for the sole purpose of testing the docs.
+
+As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
+returns nothing.]]></description>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * SECTION:tester
+ * @short_description: module for gtk-doc unit test
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ *
+ * As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
+ * returns nothing.
+ */]]></output>
+</test>
+
+<test>
+ <input>/**
+ * test:
+ * @a: arg
+ *
+ * lonely function
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>test</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>arg</description>
+ </parameter>
+ </parameters>
+ <description>lonely function</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * test:
+ * @a: arg
+ *
+ * lonely function
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml
new file mode 100644
index 00000000..40fbbff5
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input>/*
+ * SECTION:tester_nodocs
+ * @short_description: module for gtk-doc unit test
+ * @title: GtkdocTesterNoDocs
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</input>
+</test>
+
+<test>
+ <input>/**
+ * SECTION:tester_nolongdesc
+ * @short_description: module for gtk-doc unit test
+ * @title: GtkdocTesterNoLongDesc
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:tester_nolongdesc</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>module for gtk-doc unit test</description>
+ </parameter>
+ <parameter>
+ <name>title</name>
+ <description>GtkdocTesterNoLongDesc</description>
+ </parameter>
+ </parameters>
+ </docblock>
+ </parser>
+ <output>/**
+ * SECTION:tester_nolongdesc
+ * @short_description: module for gtk-doc unit test
+ * @title: GtkdocTesterNoLongDesc
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * SECTION:tester_noshortdesc
+ * @title: GtkdocTesterNoShortDesc
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:tester_noshortdesc</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>title</name>
+ <description>GtkdocTesterNoShortDesc</description>
+ </parameter>
+ </parameters>
+ <description>This file contains non-sense code for the sole purpose of testing the docs.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * SECTION:tester_noshortdesc
+ * @title: GtkdocTesterNoShortDesc
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * SECTION:tester_brokendocs
+ * @short_description: module for gtk-doc unit test
+ * @title: GtkdocTesterBrokenDocs
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:tester_brokendocs</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>module for gtk-doc unit test</description>
+ </parameter>
+ <parameter>
+ <name>title</name>
+ <description>GtkdocTesterBrokenDocs</description>
+ </parameter>
+ </parameters>
+ <description>This file contains non-sense code for the sole purpose of testing the docs.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * SECTION:tester_brokendocs
+ * @short_description: module for gtk-doc unit test
+ * @title: GtkdocTesterBrokenDocs
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * func_no_docs:
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>func_no_docs</name>
+ </identifier>
+ </docblock>
+ </parser>
+ <output>/**
+ * func_no_docs:
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * func_no_item_docs:
+ *
+ * Here we document the function but not the parameters.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>func_no_item_docs</name>
+ </identifier>
+ <description>Here we document the function but not the parameters.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * func_no_item_docs:
+ *
+ * Here we document the function but not the parameters.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * func_incomplete_docs:
+ * @a: a value
+ *
+ * Here we document the function but not all the parameters.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>func_incomplete_docs</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>a value</description>
+ </parameter>
+ </parameters>
+ <description>Here we document the function but not all the parameters.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * func_incomplete_docs:
+ * @a: a value
+ *
+ * Here we document the function but not all the parameters.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * func_unused_docs:
+ * @a: a value
+ * @b: a value
+ * @c: an unexisting value
+ *
+ * Here we document the function and more than the actual parameters.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>func_unused_docs</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>a value</description>
+ </parameter>
+ <parameter>
+ <name>b</name>
+ <description>a value</description>
+ </parameter>
+ <parameter>
+ <name>c</name>
+ <description>an unexisting value</description>
+ </parameter>
+ </parameters>
+ <description>Here we document the function and more than the actual parameters.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * func_unused_docs:
+ * @a: a value
+ * @b: a value
+ * @c: an unexisting value
+ *
+ * Here we document the function and more than the actual parameters.
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml b/tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml
new file mode 100644
index 00000000..069ae71a
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+<input>/**
+ * MACRO_NO_ITEM_DOCS:
+ *
+ * Here we document the macro but not the parameters.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>MACRO_NO_ITEM_DOCS</name>
+ </identifier>
+ <description>Here we document the macro but not the parameters.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * MACRO_NO_ITEM_DOCS:
+ *
+ * Here we document the macro but not the parameters.
+ */</output>
+</test>
+
+<test>
+<input>/**
+ * MACRO_INCOMPLETE_DOCS:
+ * @a: a value
+ *
+ * Here we document the macro but not all the parameters.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>MACRO_INCOMPLETE_DOCS</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>a value</description>
+ </parameter>
+ </parameters>
+ <description>Here we document the macro but not all the parameters.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * MACRO_INCOMPLETE_DOCS:
+ * @a: a value
+ *
+ * Here we document the macro but not all the parameters.
+ */</output>
+</test>
+
+<test>
+<input>/**
+ * MACRO_UNUSED_DOCS:
+ * @a: a value
+ * @b: a value
+ * @c: an unexisting value
+ *
+ * Here we document the macro and more than the actual parameters.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>MACRO_UNUSED_DOCS</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>a value</description>
+ </parameter>
+ <parameter>
+ <name>b</name>
+ <description>a value</description>
+ </parameter>
+ <parameter>
+ <name>c</name>
+ <description>an unexisting value</description>
+ </parameter>
+ </parameters>
+ <description>Here we document the macro and more than the actual parameters.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * MACRO_UNUSED_DOCS:
+ * @a: a value
+ * @b: a value
+ * @c: an unexisting value
+ *
+ * Here we document the macro and more than the actual parameters.
+ */</output>
+</test>
+
+<test>
+<input>/**
+ * EnumNoItemDocs:
+ *
+ * Here we document the enum but not the values.
+ * http://bugzilla.gnome.org/show_bug.cgi?id=568711
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>EnumNoItemDocs</name>
+ </identifier>
+ <description>Here we document the enum but not the values.
+http://bugzilla.gnome.org/show_bug.cgi?id=568711</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * EnumNoItemDocs:
+ *
+ * Here we document the enum but not the values.
+ * http://bugzilla.gnome.org/show_bug.cgi?id=568711
+ */</output>
+</test>
+
+<test>
+<input>/**
+ * EnumIncompleteDocs:
+ * @ENUM_INCOMPLETE_DOCS_1: a value
+ *
+ * Here we document the enum but not all the values.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>EnumIncompleteDocs</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>ENUM_INCOMPLETE_DOCS_1</name>
+ <description>a value</description>
+ </parameter>
+ </parameters>
+ <description>Here we document the enum but not all the values.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * EnumIncompleteDocs:
+ * @ENUM_INCOMPLETE_DOCS_1: a value
+ *
+ * Here we document the enum but not all the values.
+ */</output>
+</test>
+
+<test>
+<input>/**
+ * EnumUnusedDocs:
+ * @ENUM_UNUSED_DOCS_1: a value
+ * @ENUM_UNUSED_DOCS_2: a value
+ * @ENUM_UNUSED_DOCS_3: an unexisting value
+ *
+ * Here we document the enum and more than the actual values.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>EnumUnusedDocs</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>ENUM_UNUSED_DOCS_1</name>
+ <description>a value</description>
+ </parameter>
+ <parameter>
+ <name>ENUM_UNUSED_DOCS_2</name>
+ <description>a value</description>
+ </parameter>
+ <parameter>
+ <name>ENUM_UNUSED_DOCS_3</name>
+ <description>an unexisting value</description>
+ </parameter>
+ </parameters>
+ <description>Here we document the enum and more than the actual values.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * EnumUnusedDocs:
+ * @ENUM_UNUSED_DOCS_1: a value
+ * @ENUM_UNUSED_DOCS_2: a value
+ * @ENUM_UNUSED_DOCS_3: an unexisting value
+ *
+ * Here we document the enum and more than the actual values.
+ */</output>
+</test>
+
+<test>
+<input>/**
+ * StructNoItemDocs:
+ *
+ * Here we document the struct but not the values.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>StructNoItemDocs</name>
+ </identifier>
+ <description>Here we document the struct but not the values.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * StructNoItemDocs:
+ *
+ * Here we document the struct but not the values.
+ */</output>
+</test>
+
+<test>
+<input>/**
+ * StructIncompleteDocs:
+ * @a: a value
+ *
+ * Here we document the struct but not all the values.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>StructIncompleteDocs</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>a value</description>
+ </parameter>
+ </parameters>
+ <description>Here we document the struct but not all the values.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * StructIncompleteDocs:
+ * @a: a value
+ *
+ * Here we document the struct but not all the values.
+ */</output>
+</test>
+
+<test>
+<input>/**
+ * StructUnusedDocs:
+ * @a: a value
+ * @b: a value
+ * @c: an unexisting value
+ *
+ * Here we document the struct and more than the actual values.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>StructUnusedDocs</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>a value</description>
+ </parameter>
+ <parameter>
+ <name>b</name>
+ <description>a value</description>
+ </parameter>
+ <parameter>
+ <name>c</name>
+ <description>an unexisting value</description>
+ </parameter>
+ </parameters>
+ <description>Here we document the struct and more than the actual values.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * StructUnusedDocs:
+ * @a: a value
+ * @b: a value
+ * @c: an unexisting value
+ *
+ * Here we document the struct and more than the actual values.
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml b/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml
new file mode 100644
index 00000000..c295edbc
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input><![CDATA[/**
+ * SECTION:iface
+ * @title: GtkdocIface
+ * @short_description: interface for gtk-doc unit test
+ * @see_also: #GtkdocObject
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ * We can link to the #GtkdocIface:itest property and the #GtkdocIface::itest
+ * signal.
+ * An instance can be configured using the gtkdoc_iface_configure() function.
+ *
+ * I can haz pictures too!
+ * <mediaobject>
+ * <imageobject><imagedata fileref="home.png" format="PNG"/></imageobject>
+ * <caption><para>Home sweet home.</para></caption>
+ * </mediaobject>
+ *
+ * Just incase you wonder, special caracters can be escaped with a \ like in \%
+ * or \# or even \@.
+ */]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:iface</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>title</name>
+ <description>GtkdocIface</description>
+ </parameter>
+ <parameter>
+ <name>short_description</name>
+ <description>interface for gtk-doc unit test</description>
+ </parameter>
+ <parameter>
+ <name>see_also</name>
+ <description>#GtkdocObject</description>
+ </parameter>
+ </parameters>
+ <description><![CDATA[This file contains non-sense code for the sole purpose of testing the docs.
+We can link to the #GtkdocIface:itest property and the #GtkdocIface::itest
+signal.
+An instance can be configured using the gtkdoc_iface_configure() function.
+
+I can haz pictures too!
+<mediaobject>
+ <imageobject><imagedata fileref="home.png" format="PNG"/></imageobject>
+ <caption><para>Home sweet home.</para></caption>
+</mediaobject>
+
+Just incase you wonder, special caracters can be escaped with a \ like in \%
+or \# or even \@.]]></description>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * SECTION:iface
+ * @title: GtkdocIface
+ * @short_description: interface for gtk-doc unit test
+ * @see_also: #GtkdocObject
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ * We can link to the #GtkdocIface:itest property and the #GtkdocIface::itest
+ * signal.
+ * An instance can be configured using the gtkdoc_iface_configure() function.
+ *
+ * I can haz pictures too!
+ * <mediaobject>
+ * <imageobject><imagedata fileref="home.png" format="PNG"/></imageobject>
+ * <caption><para>Home sweet home.</para></caption>
+ * </mediaobject>
+ *
+ * Just incase you wonder, special caracters can be escaped with a \ like in \%
+ * or \# or even \@.
+ */]]></output>
+</test>
+
+<test>
+ <input>/**
+ * SECTION:iface2
+ * @title: GtkdocIface2
+ * @short_description: interface with a prerequisite for gtk-doc unit test
+ * @see_also: #GtkdocObject, #GtkdocIface
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:iface2</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>title</name>
+ <description>GtkdocIface2</description>
+ </parameter>
+ <parameter>
+ <name>short_description</name>
+ <description>interface with a prerequisite for gtk-doc unit test</description>
+ </parameter>
+ <parameter>
+ <name>see_also</name>
+ <description>#GtkdocObject, #GtkdocIface</description>
+ </parameter>
+ </parameters>
+ <description>This file contains non-sense code for the sole purpose of testing the docs.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * SECTION:iface2
+ * @title: GtkdocIface2
+ * @short_description: interface with a prerequisite for gtk-doc unit test
+ * @see_also: #GtkdocObject, #GtkdocIface
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * gtkdoc_iface_configure:
+ * @config: settings
+ *
+ * Configure a new instance
+ *
+ * Returns: %TRUE for sucess or %FALSE in case of an error
+ * Since: 0.1
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>gtkdoc_iface_configure</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>config</name>
+ <description>settings</description>
+ </parameter>
+ </parameters>
+ <description>Configure a new instance</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>%TRUE for sucess or %FALSE in case of an error</description>
+ </tag>
+ <tag>
+ <name>since</name>
+ <value>0.1</value>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * gtkdoc_iface_configure:
+ * @config: settings
+ *
+ * Configure a new instance
+ *
+ * Returns: %TRUE for sucess or %FALSE in case of an error
+ * Since: 0.1
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocIface::itest:
+ * @self: myself
+ *
+ * The event has been triggered.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocIface::itest</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>self</name>
+ <description>myself</description>
+ </parameter>
+ </parameters>
+ <description>The event has been triggered.</description>
+ </docblock>
+ </parser>
+ <output> /**
+ * GtkdocIface::itest:
+ * @self: myself
+ *
+ * The event has been triggered.
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/giface.h.xml b/tests/scanner/annotationparser/gtkdoc/gobject/giface.h.xml
new file mode 100644
index 00000000..e3ed09ca
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/gobject/giface.h.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input>/**
+ * GtkdocIface:
+ *
+ * opaque instance of gtk-doc unit test interface
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocIface</name>
+ </identifier>
+ <description>opaque instance of gtk-doc unit test interface</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocIface:
+ *
+ * opaque instance of gtk-doc unit test interface
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocIface2:
+ *
+ * opaque instance of gtk-doc unit test interface
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocIface2</name>
+ </identifier>
+ <description>opaque instance of gtk-doc unit test interface</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocIface2:
+ *
+ * opaque instance of gtk-doc unit test interface
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocIfaceInterface:
+ * @parent: this is a bug :/
+ * @test: overideable method
+ *
+ * class data of gtk-doc unit test interface
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocIfaceInterface</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>parent</name>
+ <description>this is a bug :/</description>
+ </parameter>
+ <parameter>
+ <name>test</name>
+ <description>overideable method</description>
+ </parameter>
+ </parameters>
+ <description>class data of gtk-doc unit test interface</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocIfaceInterface:
+ * @parent: this is a bug :/
+ * @test: overideable method
+ *
+ * class data of gtk-doc unit test interface
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GTKDOC_IFACE_MACRO_DUMMY:
+ * @parameter_1: first arg
+ * @parameter_2: second arg
+ *
+ * This macro does nothing.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GTKDOC_IFACE_MACRO_DUMMY</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>parameter_1</name>
+ <description>first arg</description>
+ </parameter>
+ <parameter>
+ <name>parameter_2</name>
+ <description>second arg</description>
+ </parameter>
+ </parameters>
+ <description>This macro does nothing.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GTKDOC_IFACE_MACRO_DUMMY:
+ * @parameter_1: first arg
+ * @parameter_2: second arg
+ *
+ * This macro does nothing.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GTKDOC_IFACE_MACRO_SUM:
+ * @parameter_1: first arg
+ * @parameter_2: second arg
+ *
+ * This macro adds its args.
+ *
+ * Returns: the sum of @parameter_1 and @parameter_2
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GTKDOC_IFACE_MACRO_SUM</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>parameter_1</name>
+ <description>first arg</description>
+ </parameter>
+ <parameter>
+ <name>parameter_2</name>
+ <description>second arg</description>
+ </parameter>
+ </parameters>
+ <description>This macro adds its args.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>the sum of @parameter_1 and @parameter_2</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * GTKDOC_IFACE_MACRO_SUM:
+ * @parameter_1: first arg
+ * @parameter_2: second arg
+ *
+ * This macro adds its args.
+ *
+ * Returns: the sum of @parameter_1 and @parameter_2
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gobject.c.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.c.xml
new file mode 100644
index 00000000..b54a1a74
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.c.xml
@@ -0,0 +1,616 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input><![CDATA[/**
+ * SECTION:object
+ * @title: GtkdocObject
+ * @short_description: class for gtk-doc unit test
+ * @see_also: #GtkdocIface
+ * @Image: object.png
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ * We can link to the #GtkdocObject:otest property and the #GtkdocObject::otest
+ * signal.
+ *
+ * When subclassing it is useful to override the #GtkdocObjectClass.test()
+ * method. The #GtkdocObjectClass.foo_bar() vmethod lets you refine your
+ * frobnicator.
+ *
+ * A new instance can be created using the gtkdoc_object_new() function. The
+ * whole lifecycle usualy looks like shown in this example:
+ * |[{{!-- language="C" --!}}
+ * GObject *myobj;
+ *
+ * myobj = gtkdoc_object_new();
+ * // do somehing
+ * g_object_unref (myobj);
+ * ]|
+ *
+ * # Examples #
+ *
+ * You can also change parameters:
+ * <informalexample>
+ * <programlisting language="c"><xi:include xmlns:xi="http://www.w3.org/2003/XInclude" parse="text" href="../../examples/gobject.c" /></programlisting>
+ * </informalexample>
+ *
+ * This example serves two main purposes:
+ * - testing conversion (long description
+ * follows here)
+ * - catching bugs
+ * - having an example
+ *
+ * Nothing more to say.
+ */]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:object</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>title</name>
+ <description>GtkdocObject</description>
+ </parameter>
+ <parameter>
+ <name>short_description</name>
+ <description>class for gtk-doc unit test</description>
+ </parameter>
+ <parameter>
+ <name>see_also</name>
+ <description>#GtkdocIface</description>
+ </parameter>
+ <parameter>
+ <name>Image</name>
+ <description>object.png</description>
+ </parameter>
+ </parameters>
+ <description><![CDATA[This file contains non-sense code for the sole purpose of testing the docs.
+We can link to the #GtkdocObject:otest property and the #GtkdocObject::otest
+signal.
+
+When subclassing it is useful to override the #GtkdocObjectClass.test()
+method. The #GtkdocObjectClass.foo_bar() vmethod lets you refine your
+frobnicator.
+
+A new instance can be created using the gtkdoc_object_new() function. The
+whole lifecycle usualy looks like shown in this example:
+|[{{!-- language="C" --!}}
+GObject *myobj;
+
+myobj = gtkdoc_object_new();
+// do somehing
+g_object_unref (myobj);
+]|
+
+# Examples #
+
+You can also change parameters:
+<informalexample>
+<programlisting language="c"><xi:include xmlns:xi="http://www.w3.org/2003/XInclude" parse="text" href="../../examples/gobject.c" /></programlisting>
+</informalexample>
+
+This example serves two main purposes:
+- testing conversion (long description
+ follows here)
+- catching bugs
+- having an example
+
+Nothing more to say.]]></description>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * SECTION:object
+ * @title: GtkdocObject
+ * @short_description: class for gtk-doc unit test
+ * @see_also: #GtkdocIface
+ * @Image: object.png
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ * We can link to the #GtkdocObject:otest property and the #GtkdocObject::otest
+ * signal.
+ *
+ * When subclassing it is useful to override the #GtkdocObjectClass.test()
+ * method. The #GtkdocObjectClass.foo_bar() vmethod lets you refine your
+ * frobnicator.
+ *
+ * A new instance can be created using the gtkdoc_object_new() function. The
+ * whole lifecycle usualy looks like shown in this example:
+ * |[{{!-- language="C" --!}}
+ * GObject *myobj;
+ *
+ * myobj = gtkdoc_object_new();
+ * // do somehing
+ * g_object_unref (myobj);
+ * ]|
+ *
+ * # Examples #
+ *
+ * You can also change parameters:
+ * <informalexample>
+ * <programlisting language="c"><xi:include xmlns:xi="http://www.w3.org/2003/XInclude" parse="text" href="../../examples/gobject.c" /></programlisting>
+ * </informalexample>
+ *
+ * This example serves two main purposes:
+ * - testing conversion (long description
+ * follows here)
+ * - catching bugs
+ * - having an example
+ *
+ * Nothing more to say.
+ */]]></output>
+</test>
+
+<test>
+ <input>/**
+ * SECTION:object2
+ * @title: GtkdocObject2
+ * @short_description: class with interface for gtk-doc unit test
+ * @see_also: #GtkdocIface
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ *
+ * Internals
+ * =========
+ *
+ * All the internal details go here or not:
+ * - single item list
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:object2</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>title</name>
+ <description>GtkdocObject2</description>
+ </parameter>
+ <parameter>
+ <name>short_description</name>
+ <description>class with interface for gtk-doc unit test</description>
+ </parameter>
+ <parameter>
+ <name>see_also</name>
+ <description>#GtkdocIface</description>
+ </parameter>
+ </parameters>
+ <description>This file contains non-sense code for the sole purpose of testing the docs.
+
+Internals
+=========
+
+All the internal details go here or not:
+- single item list</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * SECTION:object2
+ * @title: GtkdocObject2
+ * @short_description: class with interface for gtk-doc unit test
+ * @see_also: #GtkdocIface
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ *
+ * Internals
+ * =========
+ *
+ * All the internal details go here or not:
+ * - single item list
+ */</output>
+</test>
+
+<test>
+ <input><![CDATA[/**
+ * gtkdoc_object_new:
+ *
+ * Create a new instance
+ * <note><para>
+ * This will only work if you have called g_type_init() before.
+ * </para></note>
+ *
+ * Returns: the instance or %NULL in case of an error
+ * Since: 0.1
+ */]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>gtkdoc_object_new</name>
+ </identifier>
+ <description><![CDATA[Create a new instance
+<note><para>
+ This will only work if you have called g_type_init() before.
+</para></note>]]></description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>the instance or %NULL in case of an error</description>
+ </tag>
+ <tag>
+ <name>since</name>
+ <value>0.1</value>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * gtkdoc_object_new:
+ *
+ * Create a new instance
+ * <note><para>
+ * This will only work if you have called g_type_init() before.
+ * </para></note>
+ *
+ * Returns: the instance or %NULL in case of an error
+ * Since: 0.1
+ */]]></output>
+</test>
+
+<test>
+ <input><![CDATA[/**
+ * gtkdoc_object_set_otest:
+ * @self: the object
+ * @value: the new otest value, whose description extends further than one
+ * line will allow
+ *
+ * Set the #GtkdocObject:otest property. This is a long paragraph.
+ *
+ * Oh, btw. setting the property directly saves us one method.
+ *
+ * Deprecated: Use g_object_set(obj,&quot;otest&quot;,value,NULL); instead.
+ * Since: 0.5
+ */]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>gtkdoc_object_set_otest</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>self</name>
+ <description>the object</description>
+ </parameter>
+ <parameter>
+ <name>value</name>
+ <description>the new otest value, whose description extends further than one
+ line will allow</description>
+ </parameter>
+ </parameters>
+ <description>Set the #GtkdocObject:otest property. This is a long paragraph.
+
+Oh, btw. setting the property directly saves us one method.</description>
+ <tags>
+ <tag>
+ <name>deprecated</name>
+ <description><![CDATA[Use g_object_set(obj,&quot;otest&quot;,value,NULL); instead.]]></description>
+ </tag>
+ <tag>
+ <name>since</name>
+ <value>0.5</value>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * gtkdoc_object_set_otest:
+ * @self: the object
+ * @value: the new otest value, whose description extends further than one
+ * line will allow
+ *
+ * Set the #GtkdocObject:otest property. This is a long paragraph.
+ *
+ * Oh, btw. setting the property directly saves us one method.
+ *
+ * Deprecated: Use g_object_set(obj,&quot;otest&quot;,value,NULL); instead.
+ * Since: 0.5
+ */]]></output>
+</test>
+
+<test>
+ <input><![CDATA[/**
+ * gtkdoc_object_frobnicate:
+ * @self: the object
+ * @n: number of iterations
+ *
+ * Frobnicate the content of @self @n times. This implements a
+ * complex algorithm (http://en.wikipedia.org/wiki/Algorithm).
+ * <footnote>
+ * <para>
+ * Negative frobnication can lead to unexpected behaviour.
+ * </para>
+ * </footnote>
+ *
+ * Since: 0.5
+ */]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>gtkdoc_object_frobnicate</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>self</name>
+ <description>the object</description>
+ </parameter>
+ <parameter>
+ <name>n</name>
+ <description>number of iterations</description>
+ </parameter>
+ </parameters>
+ <description><![CDATA[Frobnicate the content of @self @n times. This implements a
+complex algorithm (http://en.wikipedia.org/wiki/Algorithm).
+<footnote>
+ <para>
+ Negative frobnication can lead to unexpected behaviour.
+ </para>
+</footnote>]]></description>
+ <tags>
+ <tag>
+ <name>since</name>
+ <value>0.5</value>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output><![CDATA[/**
+ * gtkdoc_object_frobnicate:
+ * @self: the object
+ * @n: number of iterations
+ *
+ * Frobnicate the content of @self @n times. This implements a
+ * complex algorithm (http://en.wikipedia.org/wiki/Algorithm).
+ * <footnote>
+ * <para>
+ * Negative frobnication can lead to unexpected behaviour.
+ * </para>
+ * </footnote>
+ *
+ * Since: 0.5
+ */]]></output>
+</test>
+
+<test>
+ <input>/**
+ * gtkdoc_object_fooify:
+ * @self: the object
+ * @...: a NULL terminated list of arguments
+ *
+ * Fooify the content of @self.
+ *
+ * Returns: %TRUE for success
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>gtkdoc_object_fooify</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>self</name>
+ <description>the object</description>
+ </parameter>
+ <parameter>
+ <name>...</name>
+ <description>a NULL terminated list of arguments</description>
+ </parameter>
+ </parameters>
+ <description>Fooify the content of @self.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>%TRUE for success</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * gtkdoc_object_fooify:
+ * @self: the object
+ * @...: a NULL terminated list of arguments
+ *
+ * Fooify the content of @self.
+ *
+ * Returns: %TRUE for success
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocObject::otest:
+ * @self: myself
+ *
+ * The event has been triggered.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObject::otest</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>self</name>
+ <description>myself</description>
+ </parameter>
+ </parameters>
+ <description>The event has been triggered.</description>
+ </docblock>
+ </parser>
+ <output> /**
+ * GtkdocObject::otest:
+ * @self: myself
+ *
+ * The event has been triggered.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocObject::dep-otest:
+ * @self: myself
+ *
+ * Here's an example signal handler.
+ * |[
+ * static gchar*
+ * otest_callback (GObject *o,
+ * gpointer user_data)
+ * {
+ * gdouble value;
+ *
+ * value = abs (o->value);
+ *
+ * return value;
+ * }
+ * ]|
+ *
+ * Deprecated: Use the #GtkdocObject::otest signal instead.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObject::dep-otest</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>self</name>
+ <description>myself</description>
+ </parameter>
+ </parameters>
+ <description>Here's an example signal handler.
+|[
+static gchar*
+otest_callback (GObject *o,
+ gpointer user_data)
+{
+ gdouble value;
+
+ value = abs (o->value);
+
+ return value;
+}
+]|</description>
+ <tags>
+ <tag>
+ <name>deprecated</name>
+ <description>Use the #GtkdocObject::otest signal instead.</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output> /**
+ * GtkdocObject::dep-otest:
+ * @self: myself
+ *
+ * Here's an example signal handler.
+ * |[
+ * static gchar*
+ * otest_callback (GObject *o,
+ * gpointer user_data)
+ * {
+ * gdouble value;
+ *
+ * value = abs (o->value);
+ *
+ * return value;
+ * }
+ * ]|
+ *
+ * Deprecated: Use the #GtkdocObject::otest signal instead.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocObject::strings-changed:
+ *
+ * Something has happened.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObject::strings-changed</name>
+ </identifier>
+ <description>Something has happened.</description>
+ </docblock>
+ </parser>
+ <output> /**
+ * GtkdocObject::strings-changed:
+ *
+ * Something has happened.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocObject::variant-changed:
+ *
+ * Something has happened.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObject::variant-changed</name>
+ </identifier>
+ <description>Something has happened.</description>
+ </docblock>
+ </parser>
+ <output> /**
+ * GtkdocObject::variant-changed:
+ *
+ * Something has happened.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocObject:otest:
+ *
+ * Since: 0.1
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObject:otest</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>since</name>
+ <value>0.1</value>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output> /**
+ * GtkdocObject:otest:
+ *
+ * Since: 0.1
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocObject:dep-otest:
+ *
+ * Deprecated: use #GtkdocObject:otest property
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObject:dep-otest</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>deprecated</name>
+ <description>use #GtkdocObject:otest property</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output> /**
+ * GtkdocObject:dep-otest:
+ *
+ * Deprecated: use #GtkdocObject:otest property
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gobject.h.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.h.xml
new file mode 100644
index 00000000..ec68a7f0
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.h.xml
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input>/**
+ * GtkdocObject:
+ *
+ * instance data of gtk-doc unit test class
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObject</name>
+ </identifier>
+ <description>instance data of gtk-doc unit test class</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocObject:
+ *
+ * instance data of gtk-doc unit test class
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocObjectClass:
+ * @parent: this is a bug :/
+ * @test: overideable method
+ * @ping: can be used before calling the @test() function
+ * @foo_bar: lets you refine your frobnicator
+ *
+ * class data of gtk-doc unit test class
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObjectClass</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>parent</name>
+ <description>this is a bug :/</description>
+ </parameter>
+ <parameter>
+ <name>test</name>
+ <description>overideable method</description>
+ </parameter>
+ <parameter>
+ <name>ping</name>
+ <description>can be used before calling the @test() function</description>
+ </parameter>
+ <parameter>
+ <name>foo_bar</name>
+ <description>lets you refine your frobnicator</description>
+ </parameter>
+ </parameters>
+ <description>class data of gtk-doc unit test class</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocObjectClass:
+ * @parent: this is a bug :/
+ * @test: overideable method
+ * @ping: can be used before calling the @test() function
+ * @foo_bar: lets you refine your frobnicator
+ *
+ * class data of gtk-doc unit test class
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocObject2:
+ *
+ * instance data of gtk-doc unit test class
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObject2</name>
+ </identifier>
+ <description>instance data of gtk-doc unit test class</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocObject2:
+ *
+ * instance data of gtk-doc unit test class
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocObject2Class:
+ * @parent: this is a bug :/
+ *
+ * class data of gtk-doc unit test class
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocObject2Class</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>parent</name>
+ <description>this is a bug :/</description>
+ </parameter>
+ </parameters>
+ <description>class data of gtk-doc unit test class</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocObject2Class:
+ * @parent: this is a bug :/
+ *
+ * class data of gtk-doc unit test class
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GTKDOC_OBJECT_MACRO_DUMMY:
+ * @parameter_1: first arg
+ * @parameter_2: second arg
+ *
+ * This macro does nothing.
+ *
+ * Since: 0.1
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GTKDOC_OBJECT_MACRO_DUMMY</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>parameter_1</name>
+ <description>first arg</description>
+ </parameter>
+ <parameter>
+ <name>parameter_2</name>
+ <description>second arg</description>
+ </parameter>
+ </parameters>
+ <description>This macro does nothing.</description>
+ <tags>
+ <tag>
+ <name>since</name>
+ <value>0.1</value>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * GTKDOC_OBJECT_MACRO_DUMMY:
+ * @parameter_1: first arg
+ * @parameter_2: second arg
+ *
+ * This macro does nothing.
+ *
+ * Since: 0.1
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GTKDOC_OBJECT_MACRO_SUM:
+ * @parameter_1: first arg
+ * @parameter_2: second arg
+ *
+ * This macro adds its args.
+ *
+ * Returns: the sum of @parameter_1 and @parameter_2
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GTKDOC_OBJECT_MACRO_SUM</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>parameter_1</name>
+ <description>first arg</description>
+ </parameter>
+ <parameter>
+ <name>parameter_2</name>
+ <description>second arg</description>
+ </parameter>
+ </parameters>
+ <description>This macro adds its args.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>the sum of @parameter_1 and @parameter_2</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * GTKDOC_OBJECT_MACRO_SUM:
+ * @parameter_1: first arg
+ * @parameter_2: second arg
+ *
+ * This macro adds its args.
+ *
+ * Returns: the sum of @parameter_1 and @parameter_2
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.c.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.c.xml
new file mode 100644
index 00000000..17d23562
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.c.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input>/**
+ * SECTION:types
+ * @title: GtkdocTypes
+ * @short_description: other gobject types for gtk-doc unit test
+ * @see_also: #GtkdocObject, #GtkdocIface
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>SECTION:types</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>title</name>
+ <description>GtkdocTypes</description>
+ </parameter>
+ <parameter>
+ <name>short_description</name>
+ <description>other gobject types for gtk-doc unit test</description>
+ </parameter>
+ <parameter>
+ <name>see_also</name>
+ <description>#GtkdocObject, #GtkdocIface</description>
+ </parameter>
+ </parameters>
+ <description>This file contains non-sense code for the sole purpose of testing the docs.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * SECTION:types
+ * @title: GtkdocTypes
+ * @short_description: other gobject types for gtk-doc unit test
+ * @see_also: #GtkdocObject, #GtkdocIface
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */</output>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml
new file mode 100644
index 00000000..7331a556
--- /dev/null
+++ b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input>/**
+ * GtkdocEnum:
+ * @GTKDOC_ENUM_V1: first
+ * @GTKDOC_ENUM_V2: second
+ * Since: 0.10
+ *
+ * Enum values for the #GtkdocEnum type.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocEnum</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>GTKDOC_ENUM_V1</name>
+ <description>first</description>
+ </parameter>
+ <parameter>
+ <name>GTKDOC_ENUM_V2</name>
+ <description>second
+ Since: 0.10</description>
+ </parameter>
+ </parameters>
+ <description>Enum values for the #GtkdocEnum type.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocEnum:
+ * @GTKDOC_ENUM_V1: first
+ * @GTKDOC_ENUM_V2: second
+ * Since: 0.10
+ *
+ * Enum values for the #GtkdocEnum type.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocPlainOldData:
+ * @n: Some integer member.
+ * @x: Some floating point member.
+ *
+ * Unboxed plain old data that should default to public members.
+ **/</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocPlainOldData</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>n</name>
+ <description>Some integer member.</description>
+ </parameter>
+ <parameter>
+ <name>x</name>
+ <description>Some floating point member.</description>
+ </parameter>
+ </parameters>
+ <description>Unboxed plain old data that should default to public members.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocPlainOldData:
+ * @n: Some integer member.
+ * @x: Some floating point member.
+ *
+ * Unboxed plain old data that should default to public members.
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * GtkdocBoxedPlainOldData:
+ * @n: Some integer member.
+ * @x: Some floating point member.
+ *
+ * Boxed plain old data that should default to public members.
+ **/</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>GtkdocBoxedPlainOldData</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>n</name>
+ <description>Some integer member.</description>
+ </parameter>
+ <parameter>
+ <name>x</name>
+ <description>Some floating point member.</description>
+ </parameter>
+ </parameters>
+ <description>Boxed plain old data that should default to public members.</description>
+ </docblock>
+ </parser>
+ <output>/**
+ * GtkdocBoxedPlainOldData:
+ * @n: Some integer member.
+ * @x: Some floating point member.
+ *
+ * Boxed plain old data that should default to public members.
+ */</output>
+</test>
+
+</tests>