summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2022-09-25 18:32:08 (GMT)
committerfvogel <fvogelnew1@free.fr>2022-09-25 18:32:08 (GMT)
commit2454910edb800435df819548f9745ffecdd2737a (patch)
treee724df1ab3cba746780d97f8995d49163340c492 /tests
parent2dfe9ca1ff82c964deb8fea5747aeabcb823dd15 (diff)
downloadtk-2454910edb800435df819548f9745ffecdd2737a.zip
tk-2454910edb800435df819548f9745ffecdd2737a.tar.gz
tk-2454910edb800435df819548f9745ffecdd2737a.tar.bz2
Remove proc updateWidgets since it now simply runs 'update' on all platforms.
Diffstat (limited to 'tests')
-rw-r--r--tests/entry.test40
-rw-r--r--tests/frame.test4
-rw-r--r--tests/spinbox.test40
-rw-r--r--tests/textImage.test2
-rw-r--r--tests/textIndex.test2
-rw-r--r--tests/textWind.test212
-rw-r--r--tests/unixEmbed.test10
7 files changed, 155 insertions, 155 deletions
diff --git a/tests/entry.test b/tests/entry.test
index fcc9427..6c2291c 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -1676,10 +1676,10 @@ test entry-5.7 {ConfigureEntry procedure} -setup {
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
- updateWidgets
+ update
set scrollInfo wrong
.e configure -width 5
- updateWidgets
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -1921,11 +1921,11 @@ test entry-7.1 {InsertChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- updateWidgets
+ update
set scrollInfo wrong
.e insert 0 abcde
.e insert 2 XXX
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -1938,11 +1938,11 @@ test entry-7.2 {InsertChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- updateWidgets
+ update
set scrollInfo wrong
.e insert 0 abcde
.e insert 500 XXX
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -2072,11 +2072,11 @@ test entry-8.1 {DeleteChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- updateWidgets
+ update
set scrollInfo wrong
.e insert 0 abcde
.e delete 2 4
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -2088,11 +2088,11 @@ test entry-8.2 {DeleteChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- updateWidgets
+ update
set scrollInfo wrong
.e insert 0 abcde
.e delete -1 2
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -2104,11 +2104,11 @@ test entry-8.3 {DeleteChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- updateWidgets
+ update
set scrollInfo wrong
.e insert 0 abcde
.e delete 3 1000
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -2942,11 +2942,11 @@ test entry-16.4 {EntryVisibleRange procedure} -body {
test entry-17.1 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
- updateWidgets
+ update
set scrollInfo wrong
.e delete 0 end
.e insert 0 123
- updateWidgets
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -2954,11 +2954,11 @@ test entry-17.1 {EntryUpdateScrollbar procedure} -body {
test entry-17.2 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
- updateWidgets
+ update
set scrollInfo wrong
.e insert 0 0123456789abcdef
.e xview 3
- updateWidgets
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -2966,11 +2966,11 @@ test entry-17.2 {EntryUpdateScrollbar procedure} -body {
test entry-17.3 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
- updateWidgets
+ update
set scrollInfo wrong
.e insert 0 abcdefghijklmnopqrs
.e xview 6
- updateWidgets
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -2983,10 +2983,10 @@ test entry-17.4 {EntryUpdateScrollbar procedure} -setup {
} -body {
entry .e -width 5
pack .e
- updateWidgets
+ update
set scrollInfo wrong
.e configure -xscrollcommand thisisnotacommand
- updateWidgets
+ update
list $x $errorInfo
} -cleanup {
destroy .e
diff --git a/tests/frame.test b/tests/frame.test
index fcd8867..01b4687 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -1169,11 +1169,11 @@ test frame-12.3 {FrameWorldChanged procedure} -setup {
labelframe .f -font myfont -text Mupp
place .f -x 0 -y 0 -width 40 -height 40
pack [frame .f.f] -fill both -expand 1
- updateWidgets
+ update
set h1 [font metrics myfont -linespace]
set y1 [winfo y .f.f]
font configure myfont -size 20
- updateWidgets
+ update
set h2 [font metrics myfont -linespace]
set y2 [winfo y .f.f]
expr {($h2 - $h1) - ($y2 - $y1)}
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 98c88cd..661f10b 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -2017,10 +2017,10 @@ test spinbox-5.7 {ConfigureSpinbox procedure} -setup {
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
- updateWidgets
+ update
set scrollInfo wrong
.e configure -width 5
- updateWidgets
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -2208,10 +2208,10 @@ test spinbox-7.1 {InsertChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- updateWidgets
+ update
set scrollInfo wrong
.e insert 2 XXX
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -2225,10 +2225,10 @@ test spinbox-7.2 {InsertChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- updateWidgets
+ update
set scrollInfo wrong
.e insert 500 XXX
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -2359,10 +2359,10 @@ test spinbox-8.1 {DeleteChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- updateWidgets
+ update
set scrollInfo wrong
.e delete 2 4
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -2375,10 +2375,10 @@ test spinbox-8.2 {DeleteChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- updateWidgets
+ update
set scrollInfo wrong
.e delete -1 2
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -2391,10 +2391,10 @@ test spinbox-8.3 {DeleteChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- updateWidgets
+ update
set scrollInfo wrong
.e delete 3 1000
- updateWidgets
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
@@ -3177,11 +3177,11 @@ test spinbox-16.2 {SpinboxVisibleRange procedure} -body {
test spinbox-17.1 {SpinboxUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
- updateWidgets
+ update
set scrollInfo wrong
.e delete 0 end
.e insert 0 123
- updateWidgets
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -3190,10 +3190,10 @@ test spinbox-17.2 {SpinboxUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
.e insert 0 0123456789abcdef
- updateWidgets
+ update
set scrollInfo wrong
.e xview 3
- updateWidgets
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -3201,11 +3201,11 @@ test spinbox-17.2 {SpinboxUpdateScrollbar procedure} -body {
test spinbox-17.3 {SpinboxUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
- updateWidgets
+ update
set scrollInfo wrong
.e insert 0 abcdefghijklmnopqrs
.e xview
- updateWidgets
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -3218,10 +3218,10 @@ test spinbox-17.4 {SpinboxUpdateScrollbar procedure} -setup {
} -body {
spinbox .e -width 5
pack .e
- updateWidgets
+ update
set scrollInfo wrong
.e configure -xscrollcommand thisisnotacommand
- updateWidgets
+ update
list $x $errorInfo
} -cleanup {
destroy .e
diff --git a/tests/textImage.test b/tests/textImage.test
index 4d143e7..5ceecf1 100644
--- a/tests/textImage.test
+++ b/tests/textImage.test
@@ -392,7 +392,7 @@ test textImage-4.2 {alignment checking - baseline} -setup {
foreach size {10 15 20 25} {
font configure test_font2 -size $size
array set Metrics [font metrics test_font2]
- updateWidgets ; .t sync
+ update ; .t sync
foreach {x y w h} [.t bbox small] {}
set norm [expr {
(([image height large] - $Metrics(-linespace))/2
diff --git a/tests/textIndex.test b/tests/textIndex.test
index 6b425c5..a191e27 100644
--- a/tests/textIndex.test
+++ b/tests/textIndex.test
@@ -754,7 +754,7 @@ set str [string repeat "hello " 20]
.t insert end "$str one two three four five six seven height nine ten\n"
.t insert end "$str one two three four five six seven height nine ten\n"
.t insert end "$str one two three four five six seven height nine ten\n"
-updateWidgets
+update
test textIndex-19.1 {Display lines} {
.t index "2.7 displaylinestart"
diff --git a/tests/textWind.test b/tests/textWind.test
index adffbc2..260ba66 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -24,7 +24,7 @@ set tHeight 6
text .t -width $tWidth -height $tHeight -bd 2 -highlightthickness 2 \
-font $fixedFont
pack .t -expand 1 -fill both
-updateWidgets
+update
.t debug on
set color [expr {[winfo depth .t] > 1 ? "green" : "black"}]
@@ -42,7 +42,7 @@ wm deiconify .
# This update is needed on MacOS to make sure that the window is mapped
# when the tests begin.
-updateWidgets
+update
set bw [.t cget -borderwidth]
set px [.t cget -padx]
@@ -60,7 +60,7 @@ test textWind-1.1 {basic tests of options} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 3 -height 3 -bg $color
.t window create 2.2 -window .f
- updateWidgets
+ update
list [winfo ismapped .f] [winfo geom .f] [.t bbox .f] \
[.t window configure .f -window]
} -result [list \
@@ -76,7 +76,7 @@ test textWind-1.2 {basic tests of options} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 3 -height 3 -bg $color
.t window create 2.2 -window .f -align top
- updateWidgets
+ update
list [winfo ismapped .f] [winfo geom .f] [.t bbox .f] \
[.t window configure .f -align]
} -result [list \
@@ -102,7 +102,7 @@ test textWind-1.4 {basic tests of options} -setup {
# the window .f should be wider than the fixed width
frame .f -width 10 -height 20 -bg $color
.t window create 2.2 -window .f -padx 5
- updateWidgets
+ update
list [winfo geom .f] [.t window configure .f -padx] [.t bbox 2.3]
} -result [list \
10x20+[expr {$padx+2*$fixedWidth+5}]+[expr {$pady+$fixedHeight}] \
@@ -116,7 +116,7 @@ test textWind-1.5 {basic tests of options} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 10 -height 20 -bg $color
.t window create 2.2 -window .f -pady 4
- updateWidgets
+ update
list [winfo geom .f] [.t window configure .f -pady] [.t bbox 2.31]
} -result [list \
10x20+[expr {$padx+2*$fixedWidth}]+[expr {$pady+$fixedHeight+4}] \
@@ -130,7 +130,7 @@ test textWind-1.6 {basic tests of options} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 5 -height 5 -bg $color
.t window create 2.2 -window .f -stretch 1
- updateWidgets
+ update
list [winfo geom .f] [.t window configure .f -stretch]
} -result [list \
5x$fixedHeight+[expr {$padx+2*$fixedWidth}]+[expr {$pady+$fixedHeight}] \
@@ -193,7 +193,7 @@ test textWind-2.11 {TkTextWindowCmd procedure} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 10 -height 6 -bg $color
.t window create 2.2 -window .f -align baseline -padx 1 -pady 2 -create foo
- updateWidgets
+ update
.t window configure .f
} -cleanup {
destroy .f
@@ -209,7 +209,7 @@ test textWind-2.12 {TkTextWindowCmd procedure} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 10 -height 6 -bg $color
.t window create 2.2 -window .f -align baseline -padx 1 -pady 2 -create foo
- updateWidgets
+ update
list [.t window configure .f -padx 33] [.t window configure .f -padx]
} -cleanup {
destroy .f
@@ -225,7 +225,7 @@ test textWind-2.13 {TkTextWindowCmd procedure} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 10 -height 6 -bg $color
.t window create 2.2 -window .f -align baseline -padx 1 -pady 2
- updateWidgets
+ update
list [.t window configure .f -padx 14 -pady 15] \
[.t window configure .f -padx] [.t window configure .f -pady]
} -cleanup {
@@ -340,9 +340,9 @@ test textWind-3.2 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.3 -window .f
- updateWidgets
+ update
.t window configure 1.3 -window {}
- updateWidgets
+ update
.t index .f
} -cleanup {
destroy .f
@@ -354,10 +354,10 @@ test textWind-3.3 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.3 -window .f
- updateWidgets
+ update
set res [winfo ismapped .f]
.t window configure 1.3 -window {}
- updateWidgets
+ update
lappend res [winfo ismapped .f] [.t bbox 1.4]
} -cleanup {
destroy .f
@@ -370,9 +370,9 @@ test textWind-3.4 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .t.f -width 10 -height 20 -bg $color
.t window create 1.3 -window .t.f
- updateWidgets
+ update
.t window configure 1.3 -window {}
- updateWidgets
+ update
.t index .t.f
} -cleanup {
destroy .t.f
@@ -384,10 +384,10 @@ test textWind-3.5 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .t.f -width 10 -height 20 -bg $color
.t window create 1.3 -window .t.f
- updateWidgets
+ update
set res [winfo ismapped .t.f]
.t window configure 1.3 -window {}
- updateWidgets
+ update
lappend res [winfo ismapped .t.f] [.t bbox 1.4]
} -cleanup {
destroy .t.f
@@ -400,9 +400,9 @@ test textWind-3.6 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.3
- updateWidgets
+ update
.t window configure 1.3 -window .f
- updateWidgets
+ update
list [catch {.t index .f} msg] $msg [winfo ismapped .f] [.t bbox 1.4]
} -cleanup {
destroy .f
@@ -461,7 +461,7 @@ test textWind-3.11 {EmbWinConfigure procedure} -setup {
button .t.b -text "Hello!"
.t window create 1.4 -window .t.b
.t window create 1.6 -window .t.b
- updateWidgets
+ update
.t index .t.b
} -result {1.6}
@@ -502,7 +502,7 @@ test textWind-5.1 {EmbWinStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -window .f
- updateWidgets
+ update
destroy .f
.t index .f
} -returnCodes error -result {bad text index ".f"}
@@ -514,7 +514,7 @@ test textWind-5.2 {EmbWinStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -window .f
- updateWidgets
+ update
destroy .f
catch {.t index .f}
list [.t bbox 1.2] [.t bbox 1.3]
@@ -530,7 +530,7 @@ test textWind-5.3 {EmbWinStructureProc procedure} -setup {
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -align bottom
.t window configure 1.2 -window .f
- updateWidgets
+ update
destroy .f
.t index .f
} -returnCodes error -result {bad text index ".f"}
@@ -542,7 +542,7 @@ test textWind-5.4 {EmbWinStructureProc procedure} -setup {
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -align bottom
.t window configure 1.2 -window .f
- updateWidgets
+ update
destroy .f
catch {.t index .f}
list [.t bbox 1.2] [.t bbox 1.3]
@@ -556,10 +556,10 @@ test textWind-5.5 {EmbWinStructureProc procedure} -setup {
} -body {
.t insert 1.0 "Some sample text"
.t window create 1.2 -create {frame .f -width 10 -height 20 -bg $color}
- updateWidgets
+ update
.t window configure 1.2 -create {frame .f -width 20 -height 10 -bg $color}
destroy .f
- updateWidgets
+ update
list [catch {.t index .f} msg] $msg [.t bbox 1.2] [.t bbox 1.3]
} -result [list 0 1.2 \
[list [expr {$padx+2*$fixedWidth}] [expr {$pady+(($fixedHeight-10)/2)}] 20 10] \
@@ -593,9 +593,9 @@ test textWind-7.1 {EmbWinLostContentProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -window .f
- updateWidgets
+ update
place .f -in .t -x 100 -y 50
- updateWidgets
+ update
list [winfo geom .f] [.t bbox 1.2]
} -cleanup {
destroy .f
@@ -610,9 +610,9 @@ test textWind-7.2 {EmbWinLostContentProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .t.f -width 10 -height 20 -bg $color
.t window create 1.2 -window .t.f
- updateWidgets
+ update
place .t.f -x 100 -y 50
- updateWidgets
+ update
list [winfo geom .t.f] [.t bbox 1.2]
} -cleanup {
destroy .t.f
@@ -672,7 +672,7 @@ test textWind-10.1 {EmbWinLayoutProc procedure} -setup {
.t window create 1.5 -create {
frame .f -width 10 -height 20 -bg $color
}
- updateWidgets
+ update
list [winfo exists .f] [winfo width .f] [winfo height .f] [.t index .f]
} -cleanup {
destroy .f
@@ -690,7 +690,7 @@ test textWind-10.2 {EmbWinLayoutProc procedure, error in creating window} -setup
error "couldn't create window"
}
set msg xyzzy
- updateWidgets
+ update
list $msg [.t bbox 1.5]
} -cleanup {
rename bgerror {}
@@ -710,7 +710,7 @@ test textWind-10.3 {EmbWinLayoutProc procedure, error in creating window} -setup
concat gorp
}
set msg xyzzy
- updateWidgets
+ update
list $msg [.t bbox 1.5]
} -cleanup {
rename bgerror {}
@@ -736,7 +736,7 @@ test textWind-10.4 {EmbWinLayoutProc procedure, error in creating window} -setup
}
set count 0
while {([llength $msg] < 2) && ($count < 100)} {
- updateWidgets
+ update
incr count
.t bbox 1.5
after 10
@@ -766,7 +766,7 @@ test textWind-10.5 {EmbWinLayoutProc procedure, error in creating window} -setup
frame .t.f
frame .t.f.f -width 10 -height 20 -bg $color
}
- updateWidgets
+ update
lappend msg [winfo exists .t.f.f]
} -cleanup {
destroy .t.f
@@ -783,12 +783,12 @@ test textWind-10.6 {EmbWinLayoutProc procedure, error in creating window} -setup
}
} -body {
.t insert 1.0 "Some sample text"
- updateWidgets
+ update
.t window create 1.5 -create {
concat .t
}
set msg {}
- updateWidgets
+ update
lappend msg [.t bbox 1.5]
} -cleanup {
rename bgerror {}
@@ -834,9 +834,9 @@ test textWind-10.8 {EmbWinLayoutProc procedure, error in creating window} -setup
concat .t2
}
set msg {}
- updateWidgets
+ update
set i 0
- while {[llength $msg] == 1 && [incr i] < 200} { updateWidgets }
+ while {[llength $msg] == 1 && [incr i] < 200} { update }
return $msg
} -cleanup {
destroy .t2
@@ -850,9 +850,9 @@ test textWind-10.9 {EmbWinLayoutProc procedure, steal window from self} -setup {
.t insert 1.0 ABCDEFGHIJKLMNOP
button .t.b -text "Hello!"
.t window create 1.5 -window .t.b
- updateWidgets
+ update
.t window create 1.3 -create {concat .t.b}
- updateWidgets
+ update
.t index .t.b
} -cleanup {
destroy .t.b
@@ -881,7 +881,7 @@ test textWind-10.11 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width [expr {($tWidth-12)*$fixedWidth}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateWidgets
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -897,7 +897,7 @@ test textWind-10.12 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width [expr {($tWidth-12)*$fixedWidth+1}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateWidgets
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -913,7 +913,7 @@ test textWind-10.13 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateWidgets
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -929,7 +929,7 @@ test textWind-10.14 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 220 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateWidgets
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -945,7 +945,7 @@ test textWind-10.15 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 250 -height 220 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateWidgets
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -967,7 +967,7 @@ test textWind-11.1 {EmbWinDisplayProc procedure, geometry transforms} -setup {
update
frame .f -width 30 -height 20 -bg $color
.t window create 1.12 -window .f
- updateWidgets
+ update
winfo geom .f
} -cleanup {
destroy .f
@@ -988,7 +988,7 @@ test textWind-11.2 {EmbWinDisplayProc procedure, geometry transforms} -setup {
update
frame .t.f -width 30 -height 20 -bg $color
.t window create 1.12 -window .t.f
- updateWidgets
+ update
winfo geom .t.f
} -cleanup {
destroy .t.f
@@ -1007,12 +1007,12 @@ test textWind-11.3 {EmbWinDisplayProc procedure, configuration optimization} -se
.t insert 1.0 "Some sample text"
frame .f -width 30 -height 20 -bg $color
.t window create 1.12 -window .f
- updateWidgets
+ update
bind .f <Configure> {set x ".f configured"}
set x {no configures}
.t delete 1.0
.t insert 1.0 "X"
- updateWidgets
+ update
return $x
} -cleanup {
destroy .f
@@ -1034,7 +1034,7 @@ test textWind-11.4 {EmbWinDisplayProc procedure, horizontal scrolling} -setup {
.t insert end " with junk after it."
.t xview moveto 0
.t xview scroll 5 units
- updateWidgets
+ update
list [winfo ismapped .f] [winfo geom .f] [.t bbox .f] [winfo ismapped .f2]
} -cleanup {
destroy .f .f2
@@ -1055,10 +1055,10 @@ test textWind-11.5 {EmbWinDisplayProc procedure, horizontal scrolling} -setup {
frame .f2 -width 40 -height 10 -bg $color
.t window create end -window .f2
.t insert end " with junk after it."
- updateWidgets
+ update
.t xview moveto 0
.t xview scroll 25 units
- updateWidgets
+ update
list [winfo ismapped .f] [winfo ismapped .f2] [winfo geom .f2] [.t bbox .f2]
} -cleanup {
destroy .f .f2
@@ -1077,20 +1077,20 @@ test textWind-12.1 {EmbWinUndisplayProc procedure, mapping/unmapping} -setup {
bind .f <Map> {lappend x mapped}
bind .f <Unmap> {lappend x unmapped}
set x created
- updateWidgets
+ update
lappend x modified
.t delete 1.0
- updateWidgets
+ update
lappend x replaced
.t window configure .f -window {}
.t delete 1.1
- updateWidgets
+ update
.t window create 1.4 -window .f
- updateWidgets
+ update
lappend x off-screen
.t configure -wrap none
.t insert 1.0 "Enough text to make the line run off-screen"
- updateWidgets
+ update
return $x
} -cleanup {
destroy .f
@@ -1104,7 +1104,7 @@ test textWind-13.1 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align top -padx 2 -pady 1
- updateWidgets
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1119,7 +1119,7 @@ test textWind-13.2 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align center -padx 2 -pady 1
- updateWidgets
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1134,7 +1134,7 @@ test textWind-13.3 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align baseline -padx 2 -pady 1
- updateWidgets
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1149,7 +1149,7 @@ test textWind-13.4 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align bottom -padx 2 -pady 1
- updateWidgets
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1164,7 +1164,7 @@ test textWind-13.5 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align top -padx 2 -pady 1 -stretch 1
- updateWidgets
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1179,7 +1179,7 @@ test textWind-13.6 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align center -padx 2 -pady 1 -stretch 1
- updateWidgets
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1194,7 +1194,7 @@ test textWind-13.7 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align baseline -padx 2 -pady 1 -stretch 1
- updateWidgets
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1209,7 +1209,7 @@ test textWind-13.8 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align bottom -padx 2 -pady 1 -stretch 1
- updateWidgets
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1226,7 +1226,7 @@ test textWind-13.9 {EmbWinBboxProc procedure, spacing options} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align center -padx 2 -pady 1
- updateWidgets
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
.t configure -spacing1 0 -spacing3 0
@@ -1243,14 +1243,14 @@ test textWind-14.1 {EmbWinDelayedUnmap procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 30 -height 20 -bg $color
.t window create 1.2 -window .f
- updateWidgets
+ update
bind .f <Unmap> {lappend x unmapped}
set x modified
.t insert 1.0 x
lappend x removed
.t window configure .f -window {}
lappend x updated
- updateWidgets
+ update
return $x
} -cleanup {
destroy .f
@@ -1263,14 +1263,14 @@ test textWind-14.2 {EmbWinDelayedUnmap procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 30 -height 20 -bg $color
.t window create 1.2 -window .f
- updateWidgets
+ update
bind .f <Unmap> {lappend x unmapped}
set x modified
.t insert 1.0 x
lappend x deleted
.t delete .f
lappend x updated
- updateWidgets
+ update
return $x
} -cleanup {
destroy .f
@@ -1283,10 +1283,10 @@ test textWind-14.3 {EmbWinDelayedUnmap procedure} -setup {
.t insert 1.0 "Some sample text\nAnother line\n3\n4\n5\n6\n7\n8\n9"
frame .f -width 30 -height 20 -bg $color
.t window create 1.2 -window .f
- updateWidgets
+ update
.t yview 2.0
set result [winfo ismapped .f]
- updateWidgets ; after 10
+ update ; after 10
list $result [winfo ismapped .f]
} -cleanup {
destroy .f
@@ -1299,10 +1299,10 @@ test textWind-14.4 {EmbWinDelayedUnmap procedure} -setup {
.t insert 1.0 "Some sample text\nAnother line\n3\n4\n5\n6\n7\n8\n9"
frame .t.f -width 30 -height 20 -bg $color
.t window create 1.2 -window .t.f
- updateWidgets
+ update
.t yview 2.0
set result [winfo ismapped .t.f]
- updateWidgets
+ update
list $result [winfo ismapped .t.f]
} -cleanup {
destroy .t.f
@@ -1340,9 +1340,9 @@ test textWind-16.1 {EmbWinTextStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 30 -height 20 -bg $color
.t window create 1.6 -window .f
- updateWidgets
+ update
pack forget .t
- updateWidgets
+ update
winfo ismapped .f
} -cleanup {
pack .t
@@ -1357,12 +1357,12 @@ test textWind-16.2 {EmbWinTextStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 30 -height 20 -bg $color
.t window create 1.6 -window .f
- updateWidgets
+ update
set result {}
lappend result [winfo geom .f] [.t bbox .f]
frame .f2 -width 150 -height 30 -bd 2 -relief raised
pack .f2 -before .t
- updateWidgets
+ update
lappend result [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f .f2
@@ -1378,9 +1378,9 @@ test textWind-16.3 {EmbWinTextStructureProc procedure} -setup {
.t configure -wrap none
.t insert 1.0 "Some sample text"
.t window create 1.6
- updateWidgets
+ update
pack forget .t
- updateWidgets
+ update
} -cleanup {
pack .t
} -result {}
@@ -1393,9 +1393,9 @@ test textWind-16.4 {EmbWinTextStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .t.f -width 30 -height 20 -bg $color
.t window create 1.6 -window .t.f
- updateWidgets
+ update
pack forget .t
- updateWidgets
+ update
list [winfo ismapped .t.f] [.t bbox .t.f]
} -cleanup {
pack .t
@@ -1411,7 +1411,7 @@ test textWind-17.1 {peer widgets and embedded windows} -setup {
.t window create 1.3 -window .f
toplevel .tt
pack [.t peer create .tt.t]
- updateWidgets
+ update
destroy .t .tt
winfo exists .f
} -result {0}
@@ -1425,10 +1425,10 @@ test textWind-17.2 {peer widgets and embedded windows} -setup {
.t window create 1.4 -window .f
toplevel .tt
pack [.t peer create .tt.t]
- updateWidgets
+ update
destroy .t
.tt.t insert 1.0 "foo"
- updateWidgets
+ update
destroy .tt
} -result {}
@@ -1440,9 +1440,9 @@ test textWind-17.3 {peer widget and -create} -setup {
.t insert 1.0 "Some sample text"
toplevel .tt
pack [.t peer create .tt.t]
- updateWidgets
+ update
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- updateWidgets
+ update
destroy .t .tt
} -result {}
@@ -1456,10 +1456,10 @@ test textWind-17.4 {peer widget deleted one window shouldn't delete others} -set
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- updateWidgets
+ update
destroy .tt
lappend res [.t get 1.2]
- updateWidgets
+ update
lappend res [.t get 1.2]
} -cleanup {
destroy .t
@@ -1474,7 +1474,7 @@ test textWind-17.5 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- updateWidgets
+ update
list [.t window cget 1.2 -window] [.tt.t window cget 1.2 -window]
} -cleanup {
destroy .tt .t
@@ -1489,7 +1489,7 @@ test textWind-17.6 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- updateWidgets
+ update
list [.t window configure 1.2 -window] \
[.tt.t window configure 1.2 -window]
} -cleanup {
@@ -1505,7 +1505,7 @@ test textWind-17.7 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- updateWidgets
+ update
list [.t window cget 1.2 -window] [.tt.t window cget 1.2 -window]
} -cleanup {
destroy .tt .t
@@ -1520,7 +1520,7 @@ test textWind-17.8 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- updateWidgets
+ update
list [.t window configure 1.2 -window] \
[.tt.t window configure 1.2 -window]
} -cleanup {
@@ -1536,7 +1536,7 @@ test textWind-17.9 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- updateWidgets
+ update
.tt.t window configure 1.2 -window [frame .tt.t.f -width 10 -height 20 -bg red]
list [.t window configure 1.2 -window] [.tt.t window configure 1.2 -window]
} -cleanup {
@@ -1552,9 +1552,9 @@ test textWind-17.10 {peer widget window configuration} -setup {
.t insert 1.0 "Some sample text"
toplevel .tt
pack [.t peer create .tt.t]
- updateWidgets
+ update
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- updateWidgets
+ update
# There is a blue window in the main widget .t but not in the peer .tt.t
lappend res [.t window cget 1.2 -window]
lappend res [.tt.t window cget 1.2 -window]
@@ -1562,7 +1562,7 @@ test textWind-17.10 {peer widget window configuration} -setup {
# inserted in .t at index 1.2 will now be found in .t at index 1.3
# The underlying linked segments are common in a text widget and its peers.
.tt.t window create 1.2 -window [frame .tt.t.f -width 25 -height 20 -bg green]
- updateWidgets
+ update
lappend res [.t window cget 1.2 -window]
lappend res [.t window cget 1.3 -window]
# In the peer, the green window still is at 1.2, and there is no window at 1.3
@@ -1573,7 +1573,7 @@ test textWind-17.10 {peer widget window configuration} -setup {
# the embedded window found at index 1.2 in .t is the one originally at 1.2 in .t, i.e.
# the blue one
.t window configure 1.2 -create {destroy %W.f ; update ; frame %W.f -width 50 -height 7 -bg red}
- updateWidgets
+ update
# The main widget .t still has a window named .t.f at 1.2. This is NOT the blue
# frame but the red frame from the -create script, which bears the same name.
lappend res [.t window cget 1.2 -window]
@@ -1582,7 +1582,7 @@ test textWind-17.10 {peer widget window configuration} -setup {
# When removing the -window option the create script plays, therefore .t still has
# the red frame .t.f at 1.2
.t window configure 1.2 -window {}
- updateWidgets
+ update
lappend res [.t window cget 1.2 -window]
# The -create script associated to index 1.2 applies to all peers (that's the reason
# why the manual states that "If multiple peer widgets are in use, it is usually simpler
@@ -1590,7 +1590,7 @@ test textWind-17.10 {peer widget window configuration} -setup {
# when removing the -window option in the peer, the -create script is run, which replaces
# the green frame by the red one named as per the -create script, i.e. .tt.t.f
.tt.t window configure 1.2 -window {}
- updateWidgets
+ update
lappend res [.tt.t window cget 1.2 -window]
} -cleanup {
destroy .tt .t
@@ -1604,12 +1604,12 @@ test textWind-18.1 {embedded window deletion triggered by a script bound to <Map
.t window create end -window [frame .f -background red -width 80 -height 80]
.t window create end -window [frame .f2 -background blue -width 80 -height 80]
bind .f <Map> {.t delete .f}
- updateWidgets
+ update
# this shall not crash (bug 1501749)
after 100 {.t yview end}
tkwait visibility .f2
after 200
- updateWidgets
+ update
} -cleanup {
destroy .t .f .f2
} -result {}
@@ -1621,7 +1621,7 @@ test textWind-18.2 {text widget deletion triggered by a script bound to embedded
for {set i 1} {$i < 100} {incr i} {.t insert end "Line $i\n"}
.t window create end -window [frame .f -background red -width 80 -height 80]
bind .f <Map> {destroy .t}
- updateWidgets
+ update
# this shall not crash (bug 1501749)
after 100 {.t yview end}
tkwait window .t
@@ -1639,7 +1639,7 @@ test textWind-18.3 {embedded window destruction in cascade} -setup {
bind .t.b1 <Destroy> {destroy .t.b2 ; set x 1}
button .t.b2
.t window create 2.0 -window .t.b2
- updateWidgets
+ update
# this shall not crash (bug 54fe7a5e71)
after 100 {.t delete 1.0 end}
tkwait variable x
diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test
index c8ca877..669ef40 100644
--- a/tests/unixEmbed.test
+++ b/tests/unixEmbed.test
@@ -1279,9 +1279,9 @@ test unixEmbed-11.1 {focus -force works for embedded toplevels} -constraints {
} -body {
toplevel .t
pack [frame .t.f -container 1 -width 200 -height 200] -fill both
- updateWidgets
+ update
toplevel .embed -use [winfo id .t.f] -bg green
- updateWidgets
+ update
focus -force .t
focus -force .embed
focus
@@ -1299,12 +1299,12 @@ test unixEmbed-11.2 {mouse coordinates in embedded toplevels} -constraints {
pack [button .main.b -text "Main Button" \
-command {lappend result "pushed .main.b"}] -padx 30 -pady 30
pack [frame .main.f -container 1 -width 200 -height 200] -fill both
- updateWidgets
+ update
toplevel .embed -use [winfo id .main.f] -bg green
- updateWidgets
+ update
pack [button .embed.b -text "Emb Button" \
-command {lappend result "pushed .embed.b"}] -padx 30 -pady 30
- updateWidgets
+ update
focus -force .main
after 100
set x [expr {[winfo rootx .main.b] + [winfo width .main.b]/2}]