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