diff options
Diffstat (limited to 'tests/test_regexlexer.py')
-rw-r--r-- | tests/test_regexlexer.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_regexlexer.py b/tests/test_regexlexer.py index 74b64d9b..b1392d3a 100644 --- a/tests/test_regexlexer.py +++ b/tests/test_regexlexer.py @@ -11,6 +11,7 @@ import unittest from pygments.token import Text from pygments.lexer import RegexLexer +from pygments.lexer import bygroups class TestLexer(RegexLexer): @@ -37,3 +38,10 @@ class TupleTransTest(unittest.TestCase): self.assertEqual(toks, [(0, Text.Root, 'a'), (1, Text.Rag, 'b'), (2, Text.Rag, 'c'), (3, Text.Beer, 'd'), (4, Text.Root, 'e')]) + + def test_multiline(self): + lx = TestLexer() + toks = list(lx.get_tokens_unprocessed('a\ne')) + self.assertEqual(toks, + [(0, Text.Root, 'a'), (1, Text, u'\n'), + (2, Text.Root, 'e')]) |