Commits

Robert Lehmann committed 7f33950 Draft

Add failing test case for #777.

Comments (0)

Files changed (1)

tests/test_regexlexer.py

 
 from pygments.token import Text
 from pygments.lexer import RegexLexer
+from pygments.lexer import bygroups
 
 
 class TestLexer(RegexLexer):
         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')])