diff options
author | Neil <nyamatongwe@gmail.com> | 2015-09-04 11:06:59 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2015-09-04 11:06:59 +1000 |
commit | c8b8650e823e9ea0fb59bdd9108c9c491a4ff4ea (patch) | |
tree | abe4ff92ab12f837ef34d31ef2652da0636492c9 /test/simpleTests.py | |
parent | ea1f44436b535c4ab4251c10664719d899c589fa (diff) | |
download | scintilla-mirror-c8b8650e823e9ea0fb59bdd9108c9c491a4ff4ea.tar.gz |
Bug [#1757]. Treat CRLF as two characters in SCI_COUNTCHARACTERS.
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 |