diff options
author | Neil <nyamatongwe@gmail.com> | 2021-06-03 20:24:44 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-06-03 20:24:44 +1000 |
commit | f997170c3eb0afa64d10b39b86799bad67dc5c02 (patch) | |
tree | a0ec6b193f9315452237c89107eb552bf77298a4 /test/simpleTests.py | |
parent | aeb285c6677ebb1d940d2a4d8e6992697ed263c8 (diff) | |
download | scintilla-mirror-f997170c3eb0afa64d10b39b86799bad67dc5c02.tar.gz |
Add APIs for setting appearance (traditional blob or plain text) and colour of
representations and support setting a representation for the "\r\n" line end
sequence.
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): |