3 pygments.lexers.testing |
3 pygments.lexers.testing |
4 ~~~~~~~~~~~~~~~~~~~~~~~ |
4 ~~~~~~~~~~~~~~~~~~~~~~~ |
5 |
5 |
6 Lexers for testing languages. |
6 Lexers for testing languages. |
7 |
7 |
8 :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. |
8 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. |
9 :license: BSD, see LICENSE for details. |
9 :license: BSD, see LICENSE for details. |
10 """ |
10 """ |
11 |
11 |
12 from pygments.lexer import RegexLexer, include, bygroups |
12 from pygments.lexer import RegexLexer, include, bygroups |
13 from pygments.token import Comment, Keyword, Name, String, Number, Generic, Text |
13 from pygments.token import Comment, Keyword, Name, String, Number, Generic, Text |
145 'root': [ |
145 'root': [ |
146 # A TAP version may be specified. |
146 # A TAP version may be specified. |
147 (r'^TAP version \d+\n', Name.Namespace), |
147 (r'^TAP version \d+\n', Name.Namespace), |
148 |
148 |
149 # Specify a plan with a plan line. |
149 # Specify a plan with a plan line. |
150 (r'^1..\d+', Keyword.Declaration, 'plan'), |
150 (r'^1\.\.\d+', Keyword.Declaration, 'plan'), |
151 |
151 |
152 # A test failure |
152 # A test failure |
153 (r'^(not ok)([^\S\n]*)(\d*)', |
153 (r'^(not ok)([^\S\n]*)(\d*)', |
154 bygroups(Generic.Error, Text, Number.Integer), 'test'), |
154 bygroups(Generic.Error, Text, Number.Integer), 'test'), |
155 |
155 |