diff options
Diffstat (limited to 'tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml')
-rw-r--r-- | tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml | 359 |
1 files changed, 359 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml b/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml new file mode 100644 index 00000000..77cabf0e --- /dev/null +++ b/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml @@ -0,0 +1,359 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <!-- + All lines (outside program- listings and CDATA sections) just containing + a ' *' (blank-asterisk) are converted to paragraph breaks. + --> + <input>/** + * SECTION:test + * + * The following line is ' *' (blank-asterisk). + * + * So this is considered a new paragraph. + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:test</name> + </identifier> + <description>The following line is ' *' (blank-asterisk). + +So this is considered a new paragraph.</description> + </docblock> + </parser> + <output>/** + * SECTION:test + * + * The following line is ' *' (blank-asterisk). + * + * So this is considered a new paragraph. + */</output> +</test> + +<test> + <!-- + Description: tag, all lines (outside program- listings and CDATA sections) just containing + a ' *' (blank-asterisk) are converted to paragraph breaks. + --> + <input>/** + * SECTION:test + * + * Description: The following line is ' *' (blank-asterisk). + * + * So this is considered a new paragraph. + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:test</name> + </identifier> + <description>The following line is ' *' (blank-asterisk). + +So this is considered a new paragraph.</description> + </docblock> + <messages> + <message>4: Warning: Test: GTK-Doc tag "Description:" has been deprecated: + * Description: The following line is ' *' (blank-asterisk). + ^</message> + </messages> + </parser> + <output>/** + * SECTION:test + * + * The following line is ' *' (blank-asterisk). + * + * So this is considered a new paragraph. + */</output> +</test> + +<test> + <!-- + ' * ' (blank-asterisk-blank) are also converted to paragraph breaks. + --> + <input>/** + * SECTION:test + * + * The following line is ' * ' (blank-asterisk-blank). + * + * So this is considered a new paragraph. + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:test</name> + </identifier> + <description>The following line is ' * ' (blank-asterisk-blank). + +So this is considered a new paragraph.</description> + </docblock> + </parser> + <output>/** + * SECTION:test + * + * The following line is ' * ' (blank-asterisk-blank). + * + * So this is considered a new paragraph. + */</output> +</test> + +<test> + <!-- + Description: tag, ' * ' (blank-asterisk-blank) are also converted to paragraph breaks. + --> + <input>/** + * SECTION:test + * + * Description: The following line is ' * ' (blank-asterisk-blank). + * + * So this is considered a new paragraph. + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:test</name> + </identifier> + <description>The following line is ' * ' (blank-asterisk-blank). + +So this is considered a new paragraph.</description> + </docblock> + <messages> + <message>4: Warning: Test: GTK-Doc tag "Description:" has been deprecated: + * Description: The following line is ' * ' (blank-asterisk-blank). + ^</message> + </messages> + </parser> + <output>/** + * SECTION:test + * + * The following line is ' * ' (blank-asterisk-blank). + * + * So this is considered a new paragraph. + */</output> +</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. + --> + <input>/** + * SECTION:test + * + * The following line is (blank-asterisk-blank-blank). + * + * So this is preceded by an empty line and is not considered a new paragraph. + */</input> + <parser> + <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> + </parser> + <output>/** + * SECTION:test + * + * The following line is (blank-asterisk-blank-blank). + * + * So this is preceded by an empty line and is not considered a new paragraph. + */</output> +</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. + --> + <input>/** + * 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. + */</input> + <parser> + <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> + <messages> + <message>4: Warning: Test: GTK-Doc tag "Description:" has been deprecated: + * Description: The following line is (blank-asterisk-blank-blank). + ^</message> + </messages> + </parser> + <output>/** + * SECTION:test + * + * The following line is (blank-asterisk-blank-blank). + * + * So this is preceded by an empty line and is not considered a new paragraph. + */</output> +</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. + --> + <input><![CDATA[/** + * SECTION:test + * + * <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> + */]]></input> + <parser> + <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> + </parser> + <output><![CDATA[/** + * SECTION:test + * + * <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> + */]]></output> +</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. + --> + <input><![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> + */]]></input> + <parser> + <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> + <messages> + <message><![CDATA[4: Warning: Test: GTK-Doc tag "Description:" has been deprecated: + * Description: <example> + ^]]></message> + </messages> + </parser> + <output><![CDATA[/** + * SECTION:test + * + * <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> + */]]></output> +</test> + +</tests> |