summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2012-07-17 17:30:47 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2012-11-28 21:31:23 +0100
commit079b2c5bf9d73ac47a7bb1c62f176cbd85fb1e2a (patch)
tree851f45373929a84b4c3f62348e3c30f255f99a9a /tests
parent2d9245c4ed1367dd243d0bdcda5509c74803a834 (diff)
downloadgobject-introspection-079b2c5bf9d73ac47a7bb1c62f176cbd85fb1e2a.tar.gz
giscanner: treat the GTK-Doc Description: tag like any other tag
and add paragraph break tests. https://bugzilla.gnome.org/show_bug.cgi?id=688897
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml117
1 files changed, 117 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml b/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml
index 62914932..4ae1e036 100644
--- a/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml
+++ b/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml
@@ -26,6 +26,28 @@ So this is considered a new paragraph.</description>
<test>
<!--
+ Description: tag, all lines (outside program- listings and CDATA sections) just containing
+ a ' *' (blank-asterisk) are converted to paragraph breaks.
+ -->
+ <commentblock>/**
+ * SECTION:test
+ *
+ * Description: The following line is ' *' (blank-asterisk).
+ *
+ * So this is considered a new paragraph.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description>The following line is ' *' (blank-asterisk).
+
+So this is considered a new paragraph.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
' * ' (blank-asterisk-blank) are also converted to paragraph breaks.
-->
<commentblock>/**
@@ -47,6 +69,27 @@ So this is considered a new paragraph.</description>
<test>
<!--
+ Description: tag, ' * ' (blank-asterisk-blank) are also converted to paragraph breaks.
+ -->
+ <commentblock>/**
+ * SECTION:test
+ *
+ * Description: The following line is ' * ' (blank-asterisk-blank).
+ *
+ * So this is considered a new paragraph.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description>The following line is ' * ' (blank-asterisk-blank).
+
+So this is considered a new paragraph.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
If you want an "empty line" but not a paragraph break, change that into ' * '
(blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
output as it contains a single space character.
@@ -70,6 +113,29 @@ So this is preceded by an empty line and is not considered a new paragraph.</des
<test>
<!--
+ Description: tag, if you want an "empty line" but not a paragraph break, change that into ' * '
+ (blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
+ output as it contains a single space character.
+ -->
+ <commentblock>/**
+ * SECTION:test
+ *
+ * Description: The following line is (blank-asterisk-blank-blank).
+ *
+ * So this is preceded by an empty line and is not considered a new paragraph.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description>The following line is (blank-asterisk-blank-blank).
+
+So this is preceded by an empty line and is not considered a new paragraph.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
If you want an "empty line" but not a paragraph break, change that into ' * '
(blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
output as it contains a single space character.
@@ -119,4 +185,55 @@ print_attributes (GIBaseInfo *info)
</docblock>
</test>
+<test>
+ <!--
+ Description: tag, if you want an "empty line" but not a paragraph break, change that into ' * '
+ (blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
+ output as it contains a single space character.
+ -->
+ <commentblock><![CDATA[/**
+ * SECTION:test
+ *
+ * Description: <example>
+ * <title>Iterating over attributes</title>
+ * <programlisting>
+ * void
+ * print_attributes (GIBaseInfo *info)
+ * {
+ * GIAttributeIter iter = { 0, };
+ * char *name;
+ * char *value;
+ *
+ * while (g_base_info_iterate_attributes (info, &iter, &name, &value))
+ * {
+ * g_print ("attribute name: %s value: %s", name, value);
+ * }
+ * }
+ * </programlisting>
+ * </example>
+ */]]></commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description><![CDATA[<example>
+<title>Iterating over attributes</title>
+<programlisting>
+void
+print_attributes (GIBaseInfo *info)
+{
+ GIAttributeIter iter = { 0, };
+ char *name;
+ char *value;
+
+ while (g_base_info_iterate_attributes (info, &iter, &name, &value))
+ {
+ g_print ("attribute name: %s value: %s", name, value);
+ }
+}
+</programlisting>
+</example>]]></description>
+ </docblock>
+</test>
+
</tests>