aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/ScintillaCallable.py
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2013-07-07 13:51:23 +1000
committerNeil <nyamatongwe@gmail.com>2013-07-07 13:51:23 +1000
commitb203d169ce0cc315f6e9892861eda150edcf77d9 (patch)
treedaf6961fdf40c10daa9e3db40636ab74a590c603 /test/ScintillaCallable.py
parent3adcd726a93251609aff8bca9b593a775ed0e954 (diff)
downloadscintilla-mirror-b203d169ce0cc315f6e9892861eda150edcf77d9.tar.gz
First argument to SetText is not used so was difficult to set a text containing NUL.
Add SetContents to make it easier to setup test cases.
Diffstat (limited to 'test/ScintillaCallable.py')
-rw-r--r--test/ScintillaCallable.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ScintillaCallable.py b/test/ScintillaCallable.py
index 4870e7388..8dbcfcdee 100644
--- a/test/ScintillaCallable.py
+++ b/test/ScintillaCallable.py
@@ -151,4 +151,9 @@ class ScintillaCallable:
def Contents(self):
return self.ByteRange(0, self.Length)
+
+ def SetContents(self, s):
+ self.TargetStart = 0
+ self.TargetEnd = self.Length
+ self.ReplaceTarget(len(s), s)