diff options
author | nyamatongwe <devnull@localhost> | 2009-10-27 00:03:30 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2009-10-27 00:03:30 +0000 |
commit | dbe307598244e62b0f16c39eee078f1c19fa396c (patch) | |
tree | bc59a48190f73bd0babbe041bccd423afea8f05d /test/simpleTests.py | |
parent | 6085a182d195a0a7d73548f321ce1ba9da005a4d (diff) | |
download | scintilla-mirror-dbe307598244e62b0f16c39eee078f1c19fa396c.tar.gz |
Added GetLexerLanguage.
Diffstat (limited to 'test/simpleTests.py')
-rw-r--r-- | test/simpleTests.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py index 581653b7f..feab296b9 100644 --- a/test/simpleTests.py +++ b/test/simpleTests.py @@ -1015,6 +1015,25 @@ class TestMultiSelection(unittest.TestCase): self.assertEquals(self.ed.GetSelectionNCaret(0), 3) self.assertEquals(self.ed.GetSelectionNCaretVirtualSpace(0), 0) +class TestLexer(unittest.TestCase): + def setUp(self): + self.xite = XiteWin.xiteFrame + self.ed = self.xite.ed + self.ed.ClearAll() + self.ed.EmptyUndoBuffer() + + def testLexerNumber(self): + self.ed.Lexer = self.ed.SCLEX_CPP + self.assertEquals(self.ed.GetLexer(), self.ed.SCLEX_CPP) + + def testLexerName(self): + self.ed.LexerLanguage = b"cpp" + self.assertEquals(self.ed.GetLexer(), self.ed.SCLEX_CPP) + name = b"-" * 100 + length = self.ed.GetLexerLanguage(0, name) + name = name[:length] + self.assertEquals(name, b"cpp") + class TestAutoComplete(unittest.TestCase): def setUp(self): |