summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/textTag.test44
1 files changed, 27 insertions, 17 deletions
diff --git a/tests/textTag.test b/tests/textTag.test
index 6489c3a..ca34bc7 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -1210,7 +1210,8 @@ test textTag-14.4 {SortTags} -setup {
} -result {x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29}
-
+set curFont [.t cget -font]
+set curWrap [.t cget -wrap]
set c [.t bbox 2.1]
set x1 [expr [lindex $c 0] + [lindex $c 2]/2]
set y1 [expr [lindex $c 1] + [lindex $c 3]/2]
@@ -1220,6 +1221,15 @@ set y2 [expr [lindex $c 1] + [lindex $c 3]/2]
set c [.t bbox 4.3]
set x3 [expr [lindex $c 0] + [lindex $c 2]/2]
set y3 [expr [lindex $c 1] + [lindex $c 3]/2]
+.t configure -font $textWidgetFont -wrap none
+update
+set c [.t bbox 2.1]
+set x4 [expr [lindex $c 0] + [lindex $c 2]/2]
+set y4 [expr [lindex $c 1] + [lindex $c 3]/2]
+set c [.t bbox 3.2]
+set x5 [expr [lindex $c 0] + [lindex $c 2]/2]
+set y5 [expr [lindex $c 1] + [lindex $c 3]/2]
+.t configure -font $curFont -wrap $curWrap
test textTag-15.1 {TkTextBindProc} -setup {
.t tag delete x y
@@ -1333,18 +1343,18 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints {
.t tag delete {*}[.t tag names]
event generate {} <Motion> -warp 1 -x -1 -y -1; update
set curFont [.t cget -font]
- .t configure -font $textWidgetFont
+ .t configure -font $textWidgetFont -wrap none
} -body {
.t tag configure big -font $bigFont
- event gen .t <ButtonRelease-1> -state 0x100 -x $x1 -y $y1
- event gen .t <Motion> -x $x2 -y $y2
+ event gen .t <ButtonRelease-1> -state 0x100 -x $x4 -y $y4
+ event gen .t <Motion> -x $x5 -y $y5
set x [.t index current]
.t tag add big 3.0
update
lappend x [.t index current]
} -cleanup {
.t tag delete big
- .t configure -font $curFont
+ .t configure -font $curFont -wrap $curWrap
} -result {3.2 3.1}
test textTag-16.3 {TkTextPickCurrent procedure} -setup {
@@ -1408,17 +1418,17 @@ test textTag-16.5 {TkTextPickCurrent procedure} -constraints {
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
set curFont [.t cget -font]
- .t configure -font $textWidgetFont
+ .t configure -font $textWidgetFont -wrap none
} -body {
.t tag configure big -font $bigFont
- event gen .t <Motion> -x $x1 -y $y1
+ event gen .t <Motion> -x $x4 -y $y4
.t tag bind a <Enter> {.t tag add big 3.0 3.2}
.t tag add a 3.2
- event gen .t <Motion> -x $x2 -y $y2
+ event gen .t <Motion> -x $x5 -y $y5
.t index current
} -cleanup {
.t tag delete a big
- .t configure -font $curFont
+ .t configure -font $curFont -wrap $curWrap
} -result {3.2}
test textTag-16.6 {TkTextPickCurrent procedure} -constraints {
@@ -1429,18 +1439,18 @@ test textTag-16.6 {TkTextPickCurrent procedure} -constraints {
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
set curFont [.t cget -font]
- .t configure -font $textWidgetFont
+ .t configure -font $textWidgetFont -wrap none
} -body {
.t tag configure big -font $bigFont
- event gen .t <Motion> -x $x1 -y $y1
+ event gen .t <Motion> -x $x4 -y $y4
.t tag bind a <Enter> {.t tag add big 3.0 3.2}
.t tag add a 3.2
- event gen .t <Motion> -x $x2 -y $y2
+ event gen .t <Motion> -x $x5 -y $y5
update
.t index current
} -cleanup {
.t tag delete a big
- .t configure -font $curFont
+ .t configure -font $curFont -wrap $curWrap
} -result {3.1}
test textTag-16.7 {TkTextPickCurrent procedure} -constraints {
@@ -1451,21 +1461,21 @@ test textTag-16.7 {TkTextPickCurrent procedure} -constraints {
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
set curFont [.t cget -font]
- .t configure -font $textWidgetFont
+ .t configure -font $textWidgetFont -wrap none
} -body {
.t tag configure big -font $bigFont
.t tag bind a <Enter> {.t tag add big 3.0 3.2}
.t tag add a 3.2
- event gen .t <Motion> -x $x1 -y $y1
+ event gen .t <Motion> -x $x4 -y $y4
.t tag bind a <Leave> {.t tag add big 3.0 3.2}
.t tag add a 2.1
- event gen .t <Motion> -x $x2 -y $y2
+ event gen .t <Motion> -x $x5 -y $y5
update
.t index current
} -cleanup {
.t tag delete a big
- .t configure -font $curFont
+ .t configure -font $curFont -wrap $curWrap
} -result {3.1}