summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser/test_patterns.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: Refactor test_parser and test_patterns to use unittest.TestSuiteSimon Feltman2013-12-291-44/+71
| | | | | | | | | | | | | Update both test_parser.py and test_patterns.py to dynamically generate TestCase sub-classes rather than modify a statically defined one. Use unittest.TestSuite to queue up the generated test cases via the "load_tests" hook. Use underscores instead of periods as a seperator for dynamically generated test cases and methods to match Python identifiers. Beyond general cleanup, these changes will help the ability to specify Python tests individually. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* giscanner: fix c0e748e1cdf8cf0803266f94c3c5ad154df504a8Dieter Verfaillie2013-10-081-0/+2
| | | | | | | | | | | When encountering /**/ in the source, parse_gtk_doc_comment() would be executed (due to the /** part starting a GTK-Doc comment block) and would happily consume the / and everything up until the next comment block was closed or EOF, thus consuming a whole block of C code... Encoutered in the wild here: https://git.gnome.org/browse/clutter-gst/tree/clutter-gst/clutter-gst-player.c?id=03f0d8f48bd7f60e582e6185cb73a07038e8d55d#n1926
* giscanner: complain about text before the ' * 'Dieter Verfaillie2013-10-081-7/+7
| | | | | | Makes our GTK-Doc comment block rewriting tool halt on such issues, requireing user intervention instead of writing back even more bogus data.
* giscanner: add missing testsDieter Verfaillie2013-10-081-8/+134
|
* giscanner: honor line and paragraph breaks in description fieldsDieter Verfaillie2013-10-081-1/+25
| | | | | | | | | GTK-Doc parameter description fields are allowed to span multiple lines, tag description fields are allowed to span multiple lines and paragraphs. A tool fixing/rewriting GTK-Doc comment blocks in source files would need to have description fields parsed and stored (almost) exactly as they appear in the source file.
* giscanner: store indentation before the '*' of each lineDieter Verfaillie2013-10-081-0/+19
|
* giscanner: store code before and after comment blockDieter Verfaillie2013-10-081-33/+124
| | | | | | so we can later use them to re-write source files containing broken GTK-Doc comment blocks where /** is preceded by and/or */ is followed by code...
* giscanner: flesh out annotation parsing and storageDieter Verfaillie2013-10-081-128/+93
| | | | | | | | | | - remove annotations regex, restore proper parens parsing - drop weird DocOption() storage class and use lists/dicts as appropriate - make GtkDocAnnotations a simple OrderedDict subclass instead of a weird hybrid dict/list storage class - Deprecate Attribute: tag, replace with (attributes) annotation on the identifier
* giscanner: extract tag valuesDieter Verfaillie2013-10-081-0/+69
|
* giscanner: fix GTK-Doc section parsingDieter Verfaillie2013-10-081-12/+6
|
* giscanner: rename "colon" to "delimiter"Dieter Verfaillie2013-10-081-104/+104
| | | | | | | It serves as a GTK-Doc "field" separator, so delimiter seems like a better name. This also makes the distinction between the colon used in property/signal names (which is not a "field" separator) and the GTK-Doc "field" separator a bit more clear.
* tests: compare matched groups when testing re'sDieter Verfaillie2013-10-081-0/+8
|
* scanner: Parse comments with */ not on a new line, but emit a warningDieter Verfaillie2012-12-021-1/+29
| | | | | | We don't know how many apps do this, but at least ibus had one. https://bugzilla.gnome.org/show_bug.cgi?id=689354
* giscanner: construct list of possible tag names for TAG_RE from _ALL_TAGS...Dieter Verfaillie2012-11-281-2/+2
| | | | | | | | ... instead of having a secondary hard-coded list. This results in the removal of giscanner/annotationpatterns.py to prevent a circular import. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: move unit tests from giscanner/annotationpatters.py...Dieter Verfaillie2012-11-281-0/+590
... to tests/scanner/annotationparser/test_patterns.py because the following patch will remove giscanner/annotationpatters.py https://bugzilla.gnome.org/show_bug.cgi?id=688897