aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/simpleTests.py
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-09-04 11:06:59 +1000
committerNeil <nyamatongwe@gmail.com>2015-09-04 11:06:59 +1000
commit37c8cba55c4b6ad5fcefec97175072d73bb58743 (patch)
tree773d03ee69cc49ae25f6556fc55e7dc4afb92882 /test/simpleTests.py
parent8baed11d7ef1fd794cbbdf250e96b7cefec34ca0 (diff)
downloadscintilla-mirror-37c8cba55c4b6ad5fcefec97175072d73bb58743.tar.gz
Bug [#1757]. Treat CRLF as two characters in SCI_COUNTCHARACTERS.
Diffstat (limited to 'test/simpleTests.py')
-rw-r--r--test/simpleTests.py8
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