summaryrefslogtreecommitdiff
path: root/tests/test_regexlexer.py
diff options
context:
space:
mode:
authorRobert Lehmann <mail@robertlehmann.de>2012-05-31 18:06:35 +0200
committerRobert Lehmann <mail@robertlehmann.de>2012-05-31 18:06:35 +0200
commit091a501594a01815006870aff44d1a1ba8c4c8fe (patch)
tree385fc15dfba68d40e2be70ee718ac5a01c14432d /tests/test_regexlexer.py
parent9a529002673988b5bf2775f7654ba2f9c46c5bee (diff)
downloadpygments-091a501594a01815006870aff44d1a1ba8c4c8fe.tar.gz
Add failing test case for #777.
Diffstat (limited to 'tests/test_regexlexer.py')
-rw-r--r--tests/test_regexlexer.py8
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')])