diff options
Diffstat (limited to 'test/simpleTests.py')
-rw-r--r-- | test/simpleTests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py index 9b7525066..c7240b269 100644 --- a/test/simpleTests.py +++ b/test/simpleTests.py @@ -1577,6 +1577,7 @@ class TestCharacterNavigation(unittest.TestCase): tv = t.encode("UTF-8") self.ed.SetContents(tv) self.assertEquals(self.ed.PositionRelative(1, 2), 6) + self.assertEquals(self.ed.CountCharacters(1, 6), 2) self.assertEquals(self.ed.PositionRelative(6, -2), 1) pos = 0 previous = 0 @@ -1593,6 +1594,13 @@ class TestCharacterNavigation(unittest.TestCase): self.assert_(after < previous) previous = after + def testLineEnd(self): + t = "a\r\nb\nc" + tv = t.encode("UTF-8") + self.ed.SetContents(tv) + for i in range(0, len(t)): + self.assertEquals(self.ed.CountCharacters(0, i), i) + class TestCaseMapping(unittest.TestCase): def setUp(self): self.xite = Xite.xiteFrame |