diff options
author | nyamatongwe <devnull@localhost> | 2013-04-05 16:35:00 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2013-04-05 16:35:00 +1100 |
commit | b8d5c125b6531fe3113c13fda2ffd2b8c5564600 (patch) | |
tree | 22789e4340242d12a1bd2f6bcdb436ae5346a484 /test/lexTests.py | |
parent | c13ae940e76493c5473f62a1d7a4b05f7be6ff03 (diff) | |
download | scintilla-mirror-b8d5c125b6531fe3113c13fda2ffd2b8c5564600.tar.gz |
Added test for Lua lexer.
Diffstat (limited to 'test/lexTests.py')
-rw-r--r-- | test/lexTests.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/lexTests.py b/test/lexTests.py index f6b67d8aa..2a245649c 100644 --- a/test/lexTests.py +++ b/test/lexTests.py @@ -58,8 +58,11 @@ class TestLexers(unittest.TestCase): self.ed.AddText(lenDocument, prog) self.ed.Colourise(0, lenDocument) self.assertEquals(self.ed.EndStyled, lenDocument) - with open(namePrevious, "rb") as f: - prevStyled = f.read() + try: + with open(namePrevious, "rb") as f: + prevStyled = f.read() + except FileNotFoundError: + prevStyled = "" progStyled = self.AsStyled() if progStyled != prevStyled: with open(nameNew, "wb") as f: @@ -104,6 +107,9 @@ class TestLexers(unittest.TestCase): def testVB(self): self.LexExample("x.vb", b"vb", [b"as dim or string"]) + def testLua(self): + self.LexExample("x.lua", b"lua", [b"function end"]) + def testD(self): self.LexExample("x.d", b"d", [b"keyword1", b"keyword2", b"", b"keyword4", b"keyword5", |