aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-06-18 01:01:56 +0000
committernyamatongwe <unknown>2010-06-18 01:01:56 +0000
commitc24f3f8fbc8b12e1a568c7ca992021fe0148cae9 (patch)
treea83536f94e871ba3a1e76a22677aebed3a5f5968 /test
parenta94c4ed8353e7eec5477bb14ea29f29547c08d50 (diff)
downloadscintilla-mirror-c24f3f8fbc8b12e1a568c7ca992021fe0148cae9.tar.gz
Fix for bug #3017572 FindText crashes with empty text
Always return start position when search text is empty.
Diffstat (limited to 'test')
-rw-r--r--test/simpleTests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/simpleTests.py b/test/simpleTests.py
index db414afea..e7e4b3671 100644
--- a/test/simpleTests.py
+++ b/test/simpleTests.py
@@ -748,6 +748,10 @@ class TestSearch(unittest.TestCase):
pos = self.ed.FindBytes(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)
+
def testCaseFind(self):
self.assertEquals(self.ed.FindBytes(0, self.ed.Length, b"big", 0), 2)
self.assertEquals(self.ed.FindBytes(0, self.ed.Length, b"bIg", 0), 2)