summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-08-14 07:42:17 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-10-08 20:56:14 +0200
commit97746398f1c3ea06b3020f43fb97d4251fc7eddf (patch)
tree58449bb63f6d323a53f0fd23dbb2e80416b6b5cd /tests
parent556bb8ee3402b92e2936ed3b594cdfc0b04a9db5 (diff)
downloadgobject-introspection-97746398f1c3ea06b3020f43fb97d4251fc7eddf.tar.gz
giscanner: store indentation before the '*' of each line
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/annotationparser/test_patterns.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/test_patterns.py b/tests/scanner/annotationparser/test_patterns.py
index ce82cf90..ead487d7 100644
--- a/tests/scanner/annotationparser/test_patterns.py
+++ b/tests/scanner/annotationparser/test_patterns.py
@@ -32,6 +32,7 @@ against the expected output.
from giscanner.annotationparser import (COMMENT_BLOCK_START_RE, COMMENT_BLOCK_END_RE,
+ COMMENT_ASTERISK_RE,
SECTION_RE, SYMBOL_RE, PROPERTY_RE,
SIGNAL_RE, PARAMETER_RE, TAG_RE,
TAG_VALUE_VERSION_RE, TAG_VALUE_STABILITY_RE)
@@ -157,6 +158,23 @@ comment_end_tests = [
'code': ''})]
+comment_asterisk_tests = [
+ (COMMENT_ASTERISK_RE, '*',
+ {}),
+ (COMMENT_ASTERISK_RE, '* ',
+ {}),
+ (COMMENT_ASTERISK_RE, ' *',
+ {}),
+ (COMMENT_ASTERISK_RE, ' * ',
+ {}),
+ (COMMENT_ASTERISK_RE, ' * ',
+ {}),
+ (COMMENT_ASTERISK_RE, ' * test',
+ {}),
+ (COMMENT_ASTERISK_RE, 'test * ',
+ None)]
+
+
identifier_section_tests = [
(SECTION_RE, 'TSIEOCN',
None),
@@ -733,6 +751,7 @@ class TestProgram(TestCase):
if __name__ == '__main__':
create_tests('test_comment_start', comment_start_tests)
create_tests('test_comment_end', comment_end_tests)
+ create_tests('test_comment_asterisk', comment_asterisk_tests)
create_tests('test_identifier_section', identifier_section_tests)
create_tests('test_identifier_symbol', identifier_symbol_tests)
create_tests('test_identifier_property', identifier_property_tests)