summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-08-23 17:01:01 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-10-08 20:57:20 +0200
commitce352de62e1ccc9ecaa2649d85569acc272ee0ed (patch)
treeffc00c9c149795ed95b2486b1f95a7800de64a8d /tests
parent001631bf9b9e672154492bf6547c0c7c985ed3e0 (diff)
downloadgobject-introspection-ce352de62e1ccc9ecaa2649d85569acc272ee0ed.tar.gz
giscanner: complain about text before the ' * '
Makes our GTK-Doc comment block rewriting tool halt on such issues, requireing user intervention instead of writing back even more bogus data.
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/annotationparser/gi/syntax.xml11
-rw-r--r--tests/scanner/annotationparser/test_patterns.py14
2 files changed, 14 insertions, 11 deletions
diff --git a/tests/scanner/annotationparser/gi/syntax.xml b/tests/scanner/annotationparser/gi/syntax.xml
index b4eff5ac..d1841a35 100644
--- a/tests/scanner/annotationparser/gi/syntax.xml
+++ b/tests/scanner/annotationparser/gi/syntax.xml
@@ -314,7 +314,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=673806</description>
* content inline. Ordinary HTML links will usually return
* %FALSE, but an inline &lt;src&gt; HTML element will return
* %TRUE.
-a *
+ a *
* Returns: whether or not this link displays its content inline.
*
**/</input>
@@ -332,8 +332,7 @@ a *
<description>Indicates whether the link currently displays some or all of its
content inline. Ordinary HTML links will usually return
%FALSE, but an inline &lt;src&gt; HTML element will return
- %TRUE.
-a *</description>
+ %TRUE.</description>
<tags>
<tag>
<name>returns</name>
@@ -341,6 +340,11 @@ a *</description>
</tag>
</tags>
</docblock>
+ <messages>
+ <message>9: Error: Test: invalid comment text:
+ a *
+ ^</message>
+ </messages>
</parser>
<output>/**
* atk_hyperlink_is_inline:
@@ -350,7 +354,6 @@ a *</description>
* content inline. Ordinary HTML links will usually return
* %FALSE, but an inline &lt;src&gt; HTML element will return
* %TRUE.
- * a *
*
* Returns: whether or not this link displays its content inline.
*/</output>
diff --git a/tests/scanner/annotationparser/test_patterns.py b/tests/scanner/annotationparser/test_patterns.py
index 3362458b..ed687a43 100644
--- a/tests/scanner/annotationparser/test_patterns.py
+++ b/tests/scanner/annotationparser/test_patterns.py
@@ -160,19 +160,19 @@ comment_end_tests = [
comment_asterisk_tests = [
(COMMENT_ASTERISK_RE, '*',
- {}),
+ {'comment': ''}),
(COMMENT_ASTERISK_RE, '* ',
- {}),
+ {'comment': ''}),
(COMMENT_ASTERISK_RE, ' *',
- {}),
+ {'comment': ''}),
(COMMENT_ASTERISK_RE, ' * ',
- {}),
+ {'comment': ''}),
(COMMENT_ASTERISK_RE, ' * ',
- {}),
+ {'comment': ''}),
(COMMENT_ASTERISK_RE, ' * test',
- {}),
+ {'comment': ''}),
(COMMENT_ASTERISK_RE, 'test * ',
- None)]
+ {'comment': 'test'})]
indentaton_tests = [