diff options
Diffstat (limited to 'test/simpleTests.py')
-rw-r--r-- | test/simpleTests.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py index 3f607bed6..63a752da4 100644 --- a/test/simpleTests.py +++ b/test/simpleTests.py @@ -1309,6 +1309,31 @@ class TestRepresentations(unittest.TestCase): result = self.ed.GetRepresentation(ohmSign) self.assertEquals(result, ohmExplained) + def testNul(self): + self.ed.SetRepresentation(b"", b"Nul") + result = self.ed.GetRepresentation(b"") + self.assertEquals(result, b"Nul") + + def testAppearance(self): + ohmSign = b"\xe2\x84\xa6" + ohmExplained = b"U+2126 \xe2\x84\xa6" + self.ed.SetRepresentation(ohmSign, ohmExplained) + result = self.ed.GetRepresentationAppearance(ohmSign) + self.assertEquals(result, self.ed.SC_REPRESENTATION_BLOB) + self.ed.SetRepresentationAppearance(ohmSign, self.ed.SC_REPRESENTATION_PLAIN) + result = self.ed.GetRepresentationAppearance(ohmSign) + self.assertEquals(result, self.ed.SC_REPRESENTATION_PLAIN) + + def testColour(self): + ohmSign = b"\xe2\x84\xa6" + ohmExplained = b"U+2126 \xe2\x84\xa6" + self.ed.SetRepresentation(ohmSign, ohmExplained) + result = self.ed.GetRepresentationColour(ohmSign) + self.assertEquals(result, 0) + self.ed.SetRepresentationColour(ohmSign, 0x10203040) + result = self.ed.GetRepresentationColour(ohmSign) + self.assertEquals(result, 0x10203040) + @unittest.skipUnless(lexersAvailable, "no lexers included") class TestProperties(unittest.TestCase): |