diff options
author | Neil <nyamatongwe@gmail.com> | 2013-07-22 19:36:55 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-07-22 19:36:55 +1000 |
commit | 199d7ee000fcb1ce24d3f4a919dc825e6c0d2f45 (patch) | |
tree | 12c648fe19907c70867438641fa36ee550923847 /test/simpleTests.py | |
parent | 47792a5650ed6c70b05ccf1c33cce015d032bd04 (diff) | |
download | scintilla-mirror-199d7ee000fcb1ce24d3f4a919dc825e6c0d2f45.tar.gz |
Added the character representation feature.
Diffstat (limited to 'test/simpleTests.py')
-rw-r--r-- | test/simpleTests.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py index 4ce6e39ea..57607c375 100644 --- a/test/simpleTests.py +++ b/test/simpleTests.py @@ -1104,6 +1104,32 @@ class TestSearch(unittest.TestCase): self.assertEquals(-1, self.ed.FindBytes(0, self.ed.Length, b"\\xAB", flags)) self.assertEquals(0, self.ed.FindBytes(0, self.ed.Length, b"\\xAD", flags)) +class TestRepresentations(unittest.TestCase): + + def setUp(self): + self.xite = Xite.xiteFrame + self.ed = self.xite.ed + self.ed.ClearAll() + self.ed.EmptyUndoBuffer() + + def testGetControl(self): + result = self.ed.GetRepresentation(b"\001") + self.assertEquals(result, b"SOH") + + def testClearControl(self): + result = self.ed.GetRepresentation(b"\002") + self.assertEquals(result, b"STX") + self.ed.ClearRepresentation(b"\002") + result = self.ed.GetRepresentation(b"\002") + self.assertEquals(result, b"") + + def testSetOhm(self): + ohmSign = b"\xe2\x84\xa6" + ohmExplained = b"U+2126 \xe2\x84\xa6" + self.ed.SetRepresentation(ohmSign, ohmExplained) + result = self.ed.GetRepresentation(ohmSign) + self.assertEquals(result, ohmExplained) + class TestProperties(unittest.TestCase): def setUp(self): |