summaryrefslogtreecommitdiffstats
path: root/tests/textIndex.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2012-12-03 01:23:46 (GMT)
committerfvogel <fvogelnew1@free.fr>2012-12-03 01:23:46 (GMT)
commit82b9f9d366526e6f6665fff5d223ba9b8bc5de98 (patch)
tree236bce19c4dd6a7a0c46977f608dc42d1f17fb64 /tests/textIndex.test
parent0b6e717a44dff02a2ce046473bbe798a8e07d6c9 (diff)
parent19fbc8aec9cd206f6df2611aa7a553599f3e5931 (diff)
downloadtk-82b9f9d366526e6f6665fff5d223ba9b8bc5de98.zip
tk-82b9f9d366526e6f6665fff5d223ba9b8bc5de98.tar.gz
tk-82b9f9d366526e6f6665fff5d223ba9b8bc5de98.tar.bz2
[Bug 3588824]: bug in image index handling for weird image names
Diffstat (limited to 'tests/textIndex.test')
-rw-r--r--tests/textIndex.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/textIndex.test b/tests/textIndex.test
index 0337fca..885ed8e 100644
--- a/tests/textIndex.test
+++ b/tests/textIndex.test
@@ -219,9 +219,31 @@ set weirdTag "funny . +- 22.1\n\t{"
set weirdMark "asdf \n{-+ 66.2\t"
.t mark set $weirdMark 4.0
.t tag config y -relief raised
+set weirdImage "foo-1"
+.t image create 2.1 -image [image create photo $weirdImage]
+set weirdEmbWin ".t.bar-1"
+entry $weirdEmbWin
+.t window create 3.1 -window $weirdEmbWin
test textIndex-3.1 {TkTextGetIndex, weird mark names} {
list [catch {.t index $weirdMark} msg] $msg
} {0 4.0}
+test textIndex-3.2 {TkTextGetIndex, weird mark names} knownBug {
+ list [catch {.t index "$weirdMark -1char"} msg] $msg
+} {0 4.0}
+test textIndex-3.3 {TkTextGetIndex, weird embedded window names} {
+ list [catch {.t index $weirdEmbWin} msg] $msg
+} {0 3.1}
+test textIndex-3.4 {TkTextGetIndex, weird embedded window names} knownBug {
+ list [catch {.t index "$weirdEmbWin -1char"} msg] $msg
+} {0 3.0}
+test textIndex-3.5 {TkTextGetIndex, weird image names} {
+ list [catch {.t index $weirdImage} msg] $msg
+} {0 2.1}
+test textIndex-3.6 {TkTextGetIndex, weird image names} knownBug {
+ list [catch {.t index "$weirdImage -1char"} msg] $msg
+} {0 2.0}
+.t delete 3.1 ; # remove the weirdEmbWin
+.t delete 2.1 ; # remove the weirdImage
test textIndex-4.1 {TkTextGetIndex, tags} {
list [catch {.t index x.first} msg] $msg