giscanner: add AnnotationParser tests
[platform/upstream/gobject-introspection.git] / tests / scanner / annotationparser / README
1 test_parser.py
2 ==============
3
4 Notes
5 -----
6
7 - the names of directories containing test .xml and the .xml files themselves should
8   not contain the hyphen ('-') character. This because we use the directory and file
9   names to generate valid Python method names (where the hyphen character is illegal).
10
11 - GTK-Doc comment blocks can contain XML fragments on their own. You can wrap such
12   comment blocks into a CDATA section to prevent the tests XML parser from doing the
13   wrong thing.
14   Occasionally, GTK-Doc comment blocks containing XML fragments can also contain CDATA
15   sections on their own. This can be handled by wrapping the GTK-Doc comment block into
16   a CDATA section as described above, and escape the embedded GTK-Doc CDATA section's
17   opening bracket "<!" with "{{!" and the matching close bracket ">" with "!}}".
18
19 - *Note well* that the trailing whitespace in gi/syntax_paragraph_breaks.xml *is* expected.
20   Whatever your text editor of choice or scm du jour might claim, trailing whitespace
21   are required for these tests!
22
23
24 Tests
25 -----
26
27 gtk-doc/*.xml:
28   The GTK-Doc comment block tests in this directory are copied verbatim from the GTK-Doc
29   test suite. Not all of these tests make sense from GTK-Doc's point of view without the
30   actual C sources they document, but are great for testing the level of understanding
31   AnnotationParser has about the GTK-Doc comment block syntax.
32
33   GTK-Doc tests originally taken at revision:
34   http://git.gnome.org/browse/gtk-doc/tree/tests?id=2a6b01253fe41412172a60f26705114b953d0a95
35
36
37 gobject-introspection/*.xml:
38   GTK-Doc comment blocks specifically designed to ensure AnnotationParser does the
39   right thing and continues to function correctly. The goal is to exercise all possible
40   combinations of tags, parameters and annotations (both current and deprecated syntax).