diff options
author | Georg Brandl <georg@python.org> | 2012-05-31 19:28:22 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2012-05-31 19:28:22 +0200 |
commit | 64d2787cd87b440b3861f834f77db9fcb8fa7ece (patch) | |
tree | 4c2bc87229ebb03b50ba551a150ced928496a9d0 /tests/test_regexlexer.py | |
parent | 07c0ab4fd125d84cbf8b812c8f0e577848f931fc (diff) | |
parent | b7861bca9e9ffa34c0059ac15a62ac985dc185dd (diff) | |
download | pygments-64d2787cd87b440b3861f834f77db9fcb8fa7ece.tar.gz |
Merged in nolta/pygments-main (pull request #76)
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')]) |