summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogel@noemail.net>2015-10-09 19:20:13 (GMT)
committerfvogel <fvogel@noemail.net>2015-10-09 19:20:13 (GMT)
commitdec90bc3b635955791dc5f2a2f6e24c9c6ee9cae (patch)
tree6efc7dab682c9f017b5b5d925089915c70383093 /tests
parent948fd1019b72a21b1aab2723a58c41830ee7f92f (diff)
parent8f250f700f2acdc89d52a18916ad079b8b11e4ff (diff)
downloadtk-dec90bc3b635955791dc5f2a2f6e24c9c6ee9cae.zip
tk-dec90bc3b635955791dc5f2a2f6e24c9c6ee9cae.tar.gz
tk-dec90bc3b635955791dc5f2a2f6e24c9c6ee9cae.tar.bz2
Fixed bug [2262711fff] - Regexp search fails with Unicode and elide
FossilOrigin-Name: 971b3d9571e166ba9f2f9e00b8e84846c7398634
Diffstat (limited to 'tests')
-rw-r--r--tests/text.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/text.test b/tests/text.test
index 2e5e495..a58ffc2 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -2781,6 +2781,24 @@ test text-20.185 {TextSearchCmd, elide up to match} {
lappend res [.t2 search -regexp bc 1.0]
lappend res [.t2 search -regexp c 1.0]
} {{} {} 1.0 2.1 2.0 3.1 2.0 3.0}
+test text-20.185.1 {TextSearchCmd, elide up to match, with UTF-8 chars before the match} {
+ deleteWindows
+ pack [text .t2]
+ .t2 tag configure e -elide 0
+ .t2 insert end A {} xyz e bb\n
+ .t2 insert end \u00c4 {} xyz e bb
+ set res {}
+ lappend res [.t2 search bb 1.0 "1.0 lineend"]
+ lappend res [.t2 search bb 2.0 "2.0 lineend"]
+ lappend res [.t2 search -regexp bb 1.0 "1.0 lineend"]
+ lappend res [.t2 search -regexp bb 2.0 "2.0 lineend"]
+ .t2 tag configure e -elide 1
+ lappend res [.t2 search bb 1.0 "1.0 lineend"]
+ lappend res [.t2 search bb 2.0 "2.0 lineend"]
+ lappend res [.t2 search -regexp bb 1.0 "1.0 lineend"]
+ lappend res [.t2 search -regexp -elide bb 2.0 "2.0 lineend"]
+ lappend res [.t2 search -regexp bb 2.0 "2.0 lineend"]
+} {1.4 2.4 1.4 2.4 1.4 2.4 1.4 2.4 2.4}
test text-20.186 {TextSearchCmd, strict limits} {
deleteWindows
pack [text .t2]