giscanner: add AnnotationParser tests
[platform/upstream/gobject-introspection.git] / tests / scanner / annotationparser / gi / syntax_paragraph_breaks.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <tests>
4
5 <test>
6   <!--
7   All lines (outside program- listings and CDATA sections) just containing
8   a ' *' (blank-asterisk) are converted to paragraph breaks.
9   -->
10   <commentblock>/**
11  * SECTION:test
12  *
13  * The following line is ' *' (blank-asterisk).
14  *
15  * So this is considered a new paragraph.
16  */</commentblock>
17   <docblock>
18     <identifier>
19       <name>SECTION:test</name>
20     </identifier>
21     <description>The following line is ' *' (blank-asterisk).
22
23 So this is considered a new paragraph.</description>
24   </docblock>
25 </test>
26
27 <test>
28   <!--
29   ' * ' (blank-asterisk-blank) are also converted to paragraph breaks.
30   -->
31   <commentblock>/**
32  * SECTION:test
33  *
34  * The following line is ' * ' (blank-asterisk-blank).
35  * 
36  * So this is considered a new paragraph.
37  */</commentblock>
38   <docblock>
39     <identifier>
40       <name>SECTION:test</name>
41     </identifier>
42     <description>The following line is ' * ' (blank-asterisk-blank).
43
44 So this is considered a new paragraph.</description>
45   </docblock>
46 </test>
47
48 <test>
49   <!--
50   If you want an "empty line" but not a paragraph break, change that into ' *  '
51   (blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
52   output as it contains a single space character.
53   -->
54   <commentblock>/**
55  * SECTION:test
56  *
57  * The following line is (blank-asterisk-blank-blank).
58  *  
59  * So this is preceded by an empty line and is not considered a new paragraph.
60  */</commentblock>
61   <docblock>
62     <identifier>
63       <name>SECTION:test</name>
64     </identifier>
65     <description>The following line is (blank-asterisk-blank-blank).
66  
67 So this is preceded by an empty line and is not considered a new paragraph.</description>
68   </docblock>
69 </test>
70
71 <test>
72   <!--
73   If you want an "empty line" but not a paragraph break, change that into ' *  '
74   (blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
75   output as it contains a single space character.
76   -->
77   <commentblock><![CDATA[/**
78  * SECTION:test
79  *
80  * <example>
81  * <title>Iterating over attributes</title>
82  * <programlisting>
83  * void
84  * print_attributes (GIBaseInfo *info)
85  * {
86  *   GIAttributeIter iter = { 0, };
87  *   char *name;
88  *   char *value;
89  *  
90  *   while (g_base_info_iterate_attributes (info, &iter, &name, &value))
91  *     {
92  *       g_print ("attribute name: %s value: %s", name, value);
93  *     }
94  * }
95  * </programlisting>
96  * </example>
97  */]]></commentblock>
98   <docblock>
99     <identifier>
100       <name>SECTION:test</name>
101     </identifier>
102     <description><![CDATA[<example>
103 <title>Iterating over attributes</title>
104 <programlisting>
105 void
106 print_attributes (GIBaseInfo *info)
107 {
108   GIAttributeIter iter = { 0, };
109   char *name;
110   char *value;
111  
112   while (g_base_info_iterate_attributes (info, &iter, &name, &value))
113     {
114       g_print ("attribute name: %s value: %s", name, value);
115     }
116 }
117 </programlisting>
118 </example>]]></description>
119   </docblock>
120 </test>
121
122 </tests>