diff options
author | Neil <nyamatongwe@gmail.com> | 2022-05-17 08:52:34 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-05-17 08:52:34 +1000 |
commit | 475450c76ceef43a7f5b2c68ed5848baee96b6dc (patch) | |
tree | 110ed93d9989eb049ecb0ee2c6fc62692adcefa0 /test/simpleTests.py | |
parent | e107ecdf3f5576e90dc90c69fc57f24d1f499b61 (diff) | |
download | scintilla-mirror-475450c76ceef43a7f5b2c68ed5848baee96b6dc.tar.gz |
Duplicate APIs to support 64-bit document positions on Win32:
SCI_GETTEXTRANGEFULL, SCI_FINDTEXTFULL, and SCI_FORMATRANGEFULL.
Diffstat (limited to 'test/simpleTests.py')
-rw-r--r-- | test/simpleTests.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py index 7b326f8e0..195479eaa 100644 --- a/test/simpleTests.py +++ b/test/simpleTests.py @@ -165,6 +165,17 @@ class TestSimple(unittest.TestCase): self.assertEquals(self.ed.Length, 4) self.assertEquals(b"xxyy", self.ed.ByteRange(0,4)) + def testTextRangeFull(self): + data = b"xy" + self.ed.InsertText(0, data) + self.assertEquals(self.ed.Length, 2) + self.assertEquals(data, self.ed.ByteRangeFull(0,2)) + + self.ed.InsertText(1, data) + # Should now be "xxyy" + self.assertEquals(self.ed.Length, 4) + self.assertEquals(b"xxyy", self.ed.ByteRangeFull(0,4)) + def testInsertNul(self): data = b"\0" self.ed.AddText(1, data) @@ -1187,6 +1198,12 @@ class TestSearch(unittest.TestCase): pos = self.ed.FindBytes(0, self.ed.Length, b"big", 0) self.assertEquals(pos, 2) + def testFindFull(self): + pos = self.ed.FindBytesFull(0, self.ed.Length, b"zzz", 0) + self.assertEquals(pos, -1) + pos = self.ed.FindBytesFull(0, self.ed.Length, b"big", 0) + self.assertEquals(pos, 2) + def testFindEmpty(self): pos = self.ed.FindBytes(0, self.ed.Length, b"", 0) self.assertEquals(pos, 0) |