From 2211f87bc6f096a2c3b1166d2cab1efc37e0f295 Mon Sep 17 00:00:00 2001 From: Kein-Hong Man Date: Mon, 28 Dec 2015 11:46:14 +1100 Subject: Bug [#1797]. Highlight changed subroutine prototype syntax for Perl 5.20. --- test/lexTests.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'test/lexTests.py') diff --git a/test/lexTests.py b/test/lexTests.py index 421c6393b..3cb80ef38 100644 --- a/test/lexTests.py +++ b/test/lexTests.py @@ -130,6 +130,12 @@ class TestLexers(unittest.TestCase): # Give up after one failure return + # Test lexing just once from beginning to end in text form. + # This is used for test cases that are too long to be exhasutively tested by lines and + # may be sensitive to line ends so are tested as if using Unix LF line ends. + def LexLongCase(self, name, lexerName, keywords, fileMode="b"): + self.LexExample(name, lexerName, keywords, "t") + def testCXX(self): self.LexExample("x.cxx", b"cpp", [b"int"]) @@ -158,8 +164,11 @@ class TestLexers(unittest.TestCase): def testPerl(self): self.LexExample("x.pl", b"perl", keywordsPerl) - def testPerlCases(self): - self.LexExample("perl-test-5220delta.pl", b"perl", keywordsPerl, "t") + def testPerl52(self): + self.LexLongCase("perl-test-5220delta.pl", b"perl", keywordsPerl) + + def testPerlPrototypes(self): + self.LexLongCase("perl-test-sub-prototypes.pl", b"perl", keywordsPerl) def testD(self): self.LexExample("x.d", b"d", -- cgit v1.2.3