summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-13 11:07:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-13 11:07:44 (GMT)
commitf8e123a7ce6504a4682cc507edae2eb8b696621f (patch)
treec52c7c579a8675b92985d44aa7daf5695c02f106 /tests
parent4658a19f9128ef93ebd4e5052547f4cf2176516e (diff)
parent873edb3321e09048e82e52ad58e133216bd2a10b (diff)
downloadtk-f8e123a7ce6504a4682cc507edae2eb8b696621f.zip
tk-f8e123a7ce6504a4682cc507edae2eb8b696621f.tar.gz
tk-f8e123a7ce6504a4682cc507edae2eb8b696621f.tar.bz2
Merge 8.7
Diffstat (limited to 'tests')
-rw-r--r--tests/bind.test2
-rw-r--r--tests/canvImg.test31
-rw-r--r--tests/constraints.tcl2
-rw-r--r--tests/entry.test63
-rw-r--r--tests/grid.test2
-rw-r--r--tests/image.test17
-rw-r--r--tests/listbox.test57
-rw-r--r--tests/menu.test2
-rw-r--r--tests/pack.test24
-rw-r--r--tests/place.test23
-rw-r--r--tests/safe.test2
-rw-r--r--tests/safePrimarySelection.test328
-rw-r--r--tests/scrollbar.test14
-rw-r--r--tests/send.test4
-rw-r--r--tests/spinbox.test44
-rw-r--r--tests/text.test8
-rw-r--r--tests/textDisp.test112
-rw-r--r--tests/textIndex.test2
-rw-r--r--tests/textWind.test8
-rw-r--r--tests/ttk/spinbox.test9
-rw-r--r--tests/unixEmbed.test12
-rw-r--r--tests/unixFont.test10
-rw-r--r--tests/unixWm.test101
-rw-r--r--tests/winSend.test10
-rw-r--r--tests/wm.test32
25 files changed, 464 insertions, 455 deletions
diff --git a/tests/bind.test b/tests/bind.test
index 718c609..9d581ea 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -7037,7 +7037,7 @@ test bind-36.1 {pointer warp with grab on master, bug [e3888d5820]} -setup {
} -cleanup {
destroy .top
unset x1 y1 x2 y2
-} -result {1}
+} -result 1
# cleanup
cleanupTests
diff --git a/tests/canvImg.test b/tests/canvImg.test
index d6ed9a8..27c00d6 100644
--- a/tests/canvImg.test
+++ b/tests/canvImg.test
@@ -174,7 +174,7 @@ test canvImg-4.2 {ConfigureImage procedure} -constraints testImageType -setup {
while {"timed out" ni $y && [lindex $y end 1] ne "display"} {
vwait y
}
- after cancel timer
+ after cancel $timer
list $x $y [.c bbox i1]
} -cleanup {
.c delete all
@@ -727,12 +727,6 @@ test canvImg-9.1 {DisplayImage procedure} -constraints testImageType -setup {
image delete foo
} -result {75 150 105 165}
-if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
- # Aqua >= 10.14 will redraw the entire image.
- set result_10_1 {{foo display 0 0 30 15}}
-} else {
- set result_10_1 {{foo display 2 4 6 8}}
-}
test canvImg-10.1 {TranslateImage procedure} -constraints testImageType -setup {
.c delete all
update
@@ -745,12 +739,11 @@ test canvImg-10.1 {TranslateImage procedure} -constraints testImageType -setup {
foo changed 2 4 6 8 30 15
vwait x
after cancel $timer
- update
return $x
} -cleanup {
.c delete all
image delete foo
-} -result $result_10_1
+} -result {{foo display 2 4 6 8}}
test canvImg-11.1 {TranslateImage procedure} -constraints testImageType -setup {
.c delete all
@@ -762,7 +755,7 @@ test canvImg-11.1 {TranslateImage procedure} -constraints testImageType -setup {
set x {}
set timer [after 500 {lappend x "timed out"}]
foo changed 2 4 6 8 40 50
- vwait x
+ vwait x
after cancel $timer
update
return $x
@@ -785,17 +778,12 @@ test canvImg-11.2 {ImageChangedProc procedure} -constraints {
.c delete all
image delete foo
} -result {30 75 70 125}
-if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
- # Aqua >= 10.14 will redraw the entire image.
- set result_11_3 {{foo2 display 0 0 80 60}}
-} else {
- set result_11_3 {{foo2 display 0 0 20 40}}
-}
+
test canvImg-11.3 {ImageChangedProc procedure} -constraints {
testImageType
} -setup {
.c delete all
- update
+ update idletasks
} -body {
image create test foo -variable x
image create test foo2 -variable z
@@ -803,17 +791,16 @@ test canvImg-11.3 {ImageChangedProc procedure} -constraints {
foo2 changed 0 0 0 0 80 60
.c create image 50 100 -image foo -tags image -anchor nw
.c create image 70 110 -image foo2 -anchor nw
- update idletasks
set z {}
set timer [after 500 {lappend z "timed out"}]
- image create test foo -variable x
- vwait x
+ image delete foo
+ vwait z
after cancel $timer
return $z
} -cleanup {
.c delete all
- image delete foo foo2
-} -result $result_11_3
+ image delete foo2
+} -result {{foo2 display 0 0 80 60}}
# cleanup
imageFinish
diff --git a/tests/constraints.tcl b/tests/constraints.tcl
index c77fb00..ff036f3 100644
--- a/tests/constraints.tcl
+++ b/tests/constraints.tcl
@@ -37,7 +37,7 @@ namespace eval tk {
namespace eval bg {
# Manage a background process.
- # Replace with slave interp or thread?
+ # Replace with child interp or thread?
namespace import ::tcltest::interpreter
namespace import ::tk::test::loadTkCommand
namespace export setup cleanup do
diff --git a/tests/entry.test b/tests/entry.test
index 8a4a457..262447f 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -12,6 +12,7 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
# For xscrollcommand
+set scrollInfo {}
proc scroll args {
global scrollInfo
set scrollInfo $args
@@ -1533,7 +1534,7 @@ test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e insert end "runs off the end of the window quite a bit."
.e xview 0
update
- .e xview -4
+ .e xview -1
.e index @0
} -cleanup {
destroy .e
@@ -1617,7 +1618,7 @@ test entry-5.3 {ConfigureEntry procedure, -textvariable} -setup {
} -body {
.e insert 0 "Some text"
.e configure -textvariable x
- return $x
+ set x
} -cleanup {
destroy .e
} -result {Some text}
@@ -1652,7 +1653,7 @@ test entry-5.5 {ConfigureEntry procedure} -setup {
lappend x [selection get]
.e1 configure -exportselection 1
lappend x [selection get]
- return $x
+ set x
} -cleanup {
destroy .e1 .e2
} -result {{This is so} {This is so} 1234}
@@ -1688,9 +1689,10 @@ test entry-5.7 {ConfigureEntry procedure} -setup {
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
- set timeout [after 500 {set $scrollInfo "timeout"}]
- vwait scrollInfo
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e configure -width 5
+ vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -1933,9 +1935,9 @@ test entry-7.1 {InsertChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 abcde
.e insert 2 XXX
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -1950,9 +1952,9 @@ test entry-7.2 {InsertChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 abcde
.e insert 500 XXX
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -2084,9 +2086,9 @@ test entry-8.1 {DeleteChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 abcde
.e delete 2 4
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -2100,9 +2102,9 @@ test entry-8.2 {DeleteChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 abcde
- .e delete -2 2
- set timeout [after 500 {set $scrollInfo "timeout"}]
+ .e delete -1 2
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -2116,9 +2118,9 @@ test entry-8.3 {DeleteChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 abcde
.e delete 3 1000
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -2833,7 +2835,7 @@ test entry-13.23 {GetEntryIndex procedure} -body {
.e insert 0 012345678901234567890
.e xview 4
update
- .e index -10
+ .e index -1
} -cleanup {
destroy .e
} -result 0
@@ -2964,9 +2966,10 @@ 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
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e delete 0 end
.e insert 0 123
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
@@ -2976,9 +2979,9 @@ 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
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 0123456789abcdef
.e xview 3
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
@@ -2988,9 +2991,9 @@ 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
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 abcdefghijklmnopqrs
.e xview 6
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
@@ -3003,8 +3006,10 @@ test entry-17.4 {EntryUpdateScrollbar procedure} -setup {
set x $msg
}
} -body {
- entry .e -width 5 -xscrollcommand thisisnotacommand
+ entry .e -width 5
pack .e
+ update idletasks
+ .e configure -xscrollcommand thisisnotacommand
vwait x
list $x $errorInfo
} -cleanup {
@@ -3047,7 +3052,7 @@ test entry-19.1 {entry widget validation} -setup {
-background red -foreground white
pack .e
.e insert 0 a
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e 1 0 a {} a all key}
@@ -3079,7 +3084,7 @@ test entry-19.3 {entry widget validation} -setup {
pack .e
.e insert 0 ab ;# previous settings
.e insert end c
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e 1 2 abc ab c all key}
@@ -3111,7 +3116,7 @@ test entry-19.5 {entry widget validation} -setup {
pack .e
.e insert 0 a123bc ;# previous settings
.e delete 2
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e 0 2 a13bc a123bc 2 all key}
@@ -3128,7 +3133,7 @@ test entry-19.6 {entry widget validation} -setup {
.e insert 0 a13bc ;# previous settings
.e configure -validate key
.e delete 1 3
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e 0 1 abc a13bc 13 key key}
@@ -3145,7 +3150,7 @@ test entry-19.7 {entry widget validation} -setup {
.e insert end abc ;# previous settings
set ::vVals {}
.e insert end d
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {}
@@ -3164,7 +3169,7 @@ test entry-19.8 {entry widget validation} -setup {
focus -force .e
# update necessary to process FocusIn event
update
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e -1 -1 abcd abcd {} focus focusin}
@@ -3185,7 +3190,7 @@ test entry-19.9 {entry widget validation} -setup {
focus -force .
# update necessary to process FocusOut event
update
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e -1 -1 abcd abcd {} focus focusout}
@@ -3203,7 +3208,7 @@ test entry-19.10 {entry widget validation} -setup {
focus -force .e
# update necessary to process FocusIn event
update
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e -1 -1 abcd abcd {} all focusin}
@@ -3224,7 +3229,7 @@ test entry-19.11 {entry widget validation} -setup {
focus -force .
# update necessary to process FocusOut event
update
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e -1 -1 abcd abcd {} all focusout}
@@ -3242,7 +3247,7 @@ test entry-19.12 {entry widget validation} -setup {
focus -force .e
# update necessary to process FocusIn event
update
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e -1 -1 abcd abcd {} focusin focusin}
@@ -3261,7 +3266,7 @@ test entry-19.13 {entry widget validation} -setup {
focus -force .
# update necessary to process FocusOut event
update
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {}
@@ -3280,7 +3285,7 @@ test entry-19.14 {entry widget validation} -setup {
focus -force .e
# update necessary to process FocusIn event
update
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {}
@@ -3302,7 +3307,7 @@ test entry-19.15 {entry widget validation} -setup {
focus -force .
# update necessary to process FocusOut event
update
- return $::vVals
+ set ::vVals
} -cleanup {
destroy .e
} -result {.e -1 -1 abcd abcd {} focusout focusout}
diff --git a/tests/grid.test b/tests/grid.test
index c138479..3e67b6e 100644
--- a/tests/grid.test
+++ b/tests/grid.test
@@ -2039,7 +2039,7 @@ test grid-23 {grid configure -in leaked from previous master - bug
pack forget .f
update
winfo ismapped .t ; # must return 1
-} {1}
+} 1
grid_reset 23
test grid-24.1 {<<NoManagedChild>> fires on last grid forget} -setup {
diff --git a/tests/image.test b/tests/image.test
index 31b7099..7eaa404 100644
--- a/tests/image.test
+++ b/tests/image.test
@@ -359,12 +359,6 @@ test image-8.1 {Tk_ImageCmd procedure, "inuse" option} -constraints {
catch {destroy .b}
} -result [list 0 1]
-if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
- # Aqua >= 10.14 will redraw the entire image in drawRect.
- set result_9_1 {{foo display 0 0 30 15}}
-} else {
- set result_9_1 {{foo display 5 6 7 8}}
-}
test image-9.1 {Tk_ImageChanged procedure} -constraints testImageType -setup {
.c delete all
imageCleanup
@@ -387,13 +381,8 @@ test image-9.1 {Tk_ImageChanged procedure} -constraints testImageType -setup {
} -cleanup {
.c delete all
imageCleanup
-} -result $result_9_1
-if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
- # Aqua >= 10.14 will redraw the entire image.
- set result_9_2 {{foo display 0 0 30 15} {foo display 0 0 30 15}}
-} else {
- set result_9_2 {{foo display 5 6 25 9} {foo display 0 0 12 14}}
-}
+} -result {{foo display 5 6 7 8}}
+
test image-9.2 {Tk_ImageChanged procedure} -constraints testImageType -setup {
.c delete all
imageCleanup
@@ -413,7 +402,7 @@ test image-9.2 {Tk_ImageChanged procedure} -constraints testImageType -setup {
} -cleanup {
.c delete all
imageCleanup
-} -result $result_9_2
+} -result {{foo display 5 6 25 9} {foo display 0 0 12 14}}
test image-10.1 {Tk_GetImage procedure} -setup {
imageCleanup
diff --git a/tests/listbox.test b/tests/listbox.test
index 8a54916..3520f99 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -587,7 +587,7 @@ test listbox-3.36 {ListboxWidgetCmd procedure, "delete" option} -setup {
} -body {
listbox .l2
.l2 insert 0 el0 el1 el2 el3 el4 el5 el6 el7
- .l2 delete -3 2
+ .l2 delete -1 2
.l2 get 0 end
} -cleanup {
destroy .l2
@@ -597,7 +597,7 @@ test listbox-3.37 {ListboxWidgetCmd procedure, "delete" option} -setup {
} -body {
listbox .l2
.l2 insert 0 el0 el1 el2 el3 el4 el5 el6 el7
- .l2 delete -3 -1
+ .l2 delete -1 -1
.l2 get 0 end
} -cleanup {
destroy .l2
@@ -684,10 +684,10 @@ test listbox-3.49 {ListboxWidgetCmd procedure, "get" option} -body {
.l get -1
} -result {}
test listbox-3.50 {ListboxWidgetCmd procedure, "get" option} -body {
- .l get -2 -1
+ .l get -1 -1
} -result {}
test listbox-3.51 {ListboxWidgetCmd procedure, "get" option} -body {
- .l get -2 3
+ .l get -1 3
} -result {el0 el1 el2 el3}
test listbox-3.52 {ListboxWidgetCmd procedure, "get" option} -body {
.l get 12 end
@@ -2129,7 +2129,7 @@ test listbox-10.19 {GetListboxIndex procedure} -setup {
pack [listbox .l]
.l insert 0 el0 el1 el2 el3 el4 el5 el6 el7 el8 el9 el10 el11
update
- .l index -2
+ .l index -1
} -cleanup {
destroy .l
} -result -1
@@ -2378,7 +2378,7 @@ test listbox-15.4 {ListboxSelect procedure, boundary conditions for indices} -bo
.l delete 0 end
.l insert 0 a b c d e f
.l select clear 0 end
- .l select set -2 -1
+ .l select set -1 -1
.l curselection
} -result {}
test listbox-15.5 {ListboxSelect procedure, boundary conditions for indices} -body {
@@ -2662,41 +2662,37 @@ test listbox-21.8 {ListboxListVarProc, test selection after listvar mod} -setup
test listbox-21.9 {ListboxListVarProc, test hscrollbar after listvar mod} -setup {
destroy .l
} -body {
- catch {unset x}
+ set x {}
listbox .l -font $fixed -width 10 -xscrollcommand "record x" -listvar x
- set log {}
pack .l
- set timeout [after 500 {set log timeout}]
- vwait log
+ update idletasks
+ set log {}
lappend x "0000000000"
- update
+ update idletasks
lappend x "00000000000000000000"
- update
+ update idletasks
set log
} -cleanup {
destroy .l
- after cancel $timeout
-} -result [list {x 0 1} {x 0 1} {x 0 0.5}]
+} -result [list {x 0 1} {x 0 0.5}]
test listbox-21.10 {ListboxListVarProc, test hscrollbar after listvar mod} -setup {
destroy .l
} -body {
catch {unset x}
listbox .l -font $fixed -width 10 -xscrollcommand "record x" -listvar x
- set log {}
pack .l
- set timeout [after 500 {set log timeout}]
- vwait log
+ update idletasks
+ set log {}
lappend x "0000000000"
- update
+ update idletasks
lappend x "00000000000000000000"
- update
+ update idletasks
set x [list "0000000000"]
- update
+ update idletasks
set log
} -cleanup {
destroy .l
- after cancel timeout
-} -result [list {x 0 1} {x 0 1} {x 0 0.5} {x 0 1}]
+} -result [list {x 0 1} {x 0 0.5} {x 0 1}]
test listbox-21.11 {ListboxListVarProc, bad list} -setup {
destroy .l
} -body {
@@ -2764,7 +2760,7 @@ test listbox-21.15 {ListboxListVarProc, update vertical scrollbar} -setup {
update
set log {}
pack .l
- set timeout [after 500 {set log timeout}]
+ set timeout [after 500 {lappend log timeout3}]
vwait log
update
lappend x a b c d e f
@@ -2801,19 +2797,19 @@ test listbox-22.1 {UpdateHScrollbar} -setup {
destroy .l
} -body {
listbox .l -font $fixed -width 10 -xscrollcommand "record x"
- set log {}
pack .l
- set timeout [after 500 {set log timeout}]
- vwait log
+ update idletasks
+ set log {}
+ set timeout [after 500 {lappend log timeout4}]
.l insert end "0000000000"
- update
+ vwait log
.l insert end "00000000000000000000"
vwait log
set log
} -cleanup {
destroy .l
after cancel $timeout
-} -result [list {x 0 1} {x 0 1} {x 0 0.5}]
+} -result [list {x 0 1} {x 0 0.5}]
# ConfigureListboxItem
@@ -3221,8 +3217,3 @@ option clear
# cleanup
cleanupTests
return
-
-
-
-
-
diff --git a/tests/menu.test b/tests/menu.test
index c288661..03e0dab 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -2060,7 +2060,7 @@ test menu-5.8 {DestroyMenuInstance - multiple clones} -setup {
set tearoff2 [tk::TearOffMenu .m1]
list [destroy $tearoff1] [destroy .m1]
} -returnCodes ok -result {{} {}}
-test menu-5.9 {DestroyMenuInstace - master menu} -setup {
+test menu-5.9 {DestroyMenuInstace - main menu} -setup {
destroy .m1
} -body {
menu .m1
diff --git a/tests/pack.test b/tests/pack.test
index c65727e..3ca2253 100644
--- a/tests/pack.test
+++ b/tests/pack.test
@@ -1532,6 +1532,15 @@ test pack-17.2 {PackLostSlaveProc procedure} -setup {
pack info .pack.a
} -returnCodes error -result {window ".pack.a" isn't packed}
+if {[tk windowingsystem] == "win32"} {
+ proc packUpdate {} {
+ update
+ }
+} else {
+ proc packUpdate {} {
+ }
+}
+
test pack-18.1 {unmap slaves when master unmapped} -constraints {
tempNotPc
} -setup {
@@ -1550,19 +1559,19 @@ test pack-18.1 {unmap slaves when master unmapped} -constraints {
eval destroy [winfo child .pack]
frame .pack.a -width 100 -height 50 -relief raised -bd 2
pack .pack.a
- update
+ update idletasks
set result [winfo ismapped .pack.a]
wm iconify .pack
- update
lappend result [winfo ismapped .pack.a]
.pack.a configure -width 200 -height 75
- update
+ update idletasks
lappend result [winfo width .pack.a ] [winfo height .pack.a] \
[winfo ismapped .pack.a]
wm deiconify .pack
- update
+ packUpdate
lappend result [winfo ismapped .pack.a]
} -result {1 0 200 75 0 1}
+
test pack-18.2 {unmap slaves when master unmapped} -setup {
eval destroy [winfo child .pack]
} -body {
@@ -1575,17 +1584,16 @@ test pack-18.2 {unmap slaves when master unmapped} -setup {
frame .pack.b -width 70 -height 30 -relief sunken -bd 2
pack .pack.a
pack .pack.b -in .pack.a
- update
+ update idletasks
set result [winfo ismapped .pack.b]
wm iconify .pack
- update
lappend result [winfo ismapped .pack.b]
.pack.b configure -width 100 -height 30
- update
+ update idletasks
lappend result [winfo width .pack.b ] [winfo height .pack.b] \
[winfo ismapped .pack.b]
wm deiconify .pack
- update
+ packUpdate
lappend result [winfo ismapped .pack.b]
} -result {1 0 100 30 0 1}
diff --git a/tests/place.test b/tests/place.test
index 975732a..041daa6 100644
--- a/tests/place.test
+++ b/tests/place.test
@@ -258,40 +258,47 @@ test place-7.10 {ReconfigurePlacement procedure, computing size} -setup {
list [winfo width .t.f2] [winfo height .t.f2]
} -result {30 60}
+if {[tk windowingsystem] == "win32"} {
+ proc placeUpdate {} {
+ update
+ }
+} else {
+ proc placeUpdate {} {
+ }
+}
test place-8.1 {MasterStructureProc, mapping and unmapping slaves} -setup {
place forget .t.f2
place forget .t.f
} -body {
place .t.f2 -relx 1.0 -rely 1.0 -anchor sw
- update
+ update idletasks
set result [winfo ismapped .t.f2]
wm iconify .t
- update
lappend result [winfo ismapped .t.f2]
place .t.f2 -x 40 -y 30 -relx 0 -rely 0 -anchor nw
- update
+ update idletasks
lappend result [winfo x .t.f2] [winfo y .t.f2] [winfo ismapped .t.f2]
wm deiconify .t
- update
+ placeUpdate
lappend result [winfo ismapped .t.f2]
} -result {1 0 40 30 0 1}
test place-8.2 {MasterStructureProc, mapping and unmapping slaves} -setup {
place forget .t.f2
place forget .t.f
+ update idletasks
} -body {
place .t.f -x 0 -y 0 -width 200 -height 100
place .t.f2 -in .t.f -relx 1.0 -rely 1.0 -anchor sw -width 50 -height 20
- update
+ update idletasks
set result [winfo ismapped .t.f2]
wm iconify .t
- update
lappend result [winfo ismapped .t.f2]
place .t.f2 -x 40 -y 30 -relx 0 -rely 0 -anchor nw
- update
+ update idletasks
lappend result [winfo x .t.f2] [winfo y .t.f2] [winfo ismapped .t.f2]
wm deiconify .t
- update
+ placeUpdate
lappend result [winfo ismapped .t.f2]
} -result {1 0 42 32 0 1}
destroy .t
diff --git a/tests/safe.test b/tests/safe.test
index 4f0ce15..6a870dd 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -202,7 +202,7 @@ test safe-4.2 {testing loadTk -use} -setup {
destroy $w
} -result {}
-test safe-5.1 {loading Tk in safe interps without master's clearance} -body {
+test safe-5.1 {loading Tk in safe interps without parent's clearance} -body {
set i [safe::interpCreate]
interp eval $i {load {} Tk}
} -cleanup {
diff --git a/tests/safePrimarySelection.test b/tests/safePrimarySelection.test
index 7c27c88..29cefa5 100644
--- a/tests/safePrimarySelection.test
+++ b/tests/safePrimarySelection.test
@@ -16,8 +16,8 @@ tcltest::loadTestedCommands
# ------------------------------------------------------------------------------
# - Tests 3.*, 6.* test that the fix for ticket de156e9efe implemented in branch
# bug-de156e9efe has been applied and still works. They test that a Safe Base
-# slave interpreter cannot write to the PRIMARY selection.
-# - The other tests verify that the master interpreter and an unsafe slave CAN
+# child interpreter cannot write to the PRIMARY selection.
+# - The other tests verify that the parent interpreter and an unsafe child CAN
# write to the PRIMARY selection, and therefore that the test scripts
# themselves are valid.
# - A text, entry, ttk::entry, listbox, spinbox or ttk::spinbox widget can have
@@ -38,7 +38,7 @@ namespace eval ::_test_tmp {}
# directory without installing Tk. In that case the usual auto_path loading
# mechanism cannot work because the tk binary is not where pkgIndex.tcl says
# it is.
-# - This command is not needed for Safe Base slaves because safe::loadTk does
+# - This command is not needed for Safe Base children because safe::loadTk does
# something similar and works correctly.
# - Based on scripts in winSend.test.
# ------------------------------------------------------------------------------
@@ -208,11 +208,11 @@ set ::_test_tmp::script {
}
}
-# Do this once for the master interpreter.
+# Do this once for the parent interpreter.
eval $::_test_tmp::script
-test safePrimarySelection-1.1 {master interpreter, text, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.1 {parent interpreter, text, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -223,8 +223,8 @@ test safePrimarySelection-1.1 {master interpreter, text, no existing selection}
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-1.2 {master interpreter, entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.2 {parent interpreter, entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -235,8 +235,8 @@ test safePrimarySelection-1.2 {master interpreter, entry, no existing selection}
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-1.3 {master interpreter, ttk::entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.3 {parent interpreter, ttk::entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -247,8 +247,8 @@ test safePrimarySelection-1.3 {master interpreter, ttk::entry, no existing selec
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-1.4 {master interpreter, listbox, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.4 {parent interpreter, listbox, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -259,8 +259,8 @@ test safePrimarySelection-1.4 {master interpreter, listbox, no existing selectio
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-1.5 {master interpreter, spinbox as entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.5 {parent interpreter, spinbox as entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -271,8 +271,8 @@ test safePrimarySelection-1.5 {master interpreter, spinbox as entry, no existing
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-1.6 {master interpreter, spinbox spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.6 {parent interpreter, spinbox spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -283,8 +283,8 @@ test safePrimarySelection-1.6 {master interpreter, spinbox spun, no existing sel
::_test_tmp::clearPrimarySelection
} -result 2
-test safePrimarySelection-1.7 {master interpreter, spinbox spun/selected/spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.7 {parent interpreter, spinbox spun/selected/spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -295,8 +295,8 @@ test safePrimarySelection-1.7 {master interpreter, spinbox spun/selected/spun, n
::_test_tmp::clearPrimarySelection
} -result 3
-test safePrimarySelection-1.8 {master interpreter, ttk::spinbox as entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.8 {parent interpreter, ttk::spinbox as entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -307,8 +307,8 @@ test safePrimarySelection-1.8 {master interpreter, ttk::spinbox as entry, no exi
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-1.9 {master interpreter, ttk::spinbox spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.9 {parent interpreter, ttk::spinbox spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -319,8 +319,8 @@ test safePrimarySelection-1.9 {master interpreter, ttk::spinbox spun, no existin
::_test_tmp::clearPrimarySelection
} -result 2
-test safePrimarySelection-1.10 {master interpreter, ttk::spinbox spun/selected/spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-1.10 {parent interpreter, ttk::spinbox spun/selected/spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
@@ -331,12 +331,12 @@ test safePrimarySelection-1.10 {master interpreter, ttk::spinbox spun/selected/s
::_test_tmp::clearPrimarySelection
} -result 3
-test safePrimarySelection-2.1 {unsafe slave interpreter, text, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.1 {unsafe child interpreter, text, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryText
@@ -348,12 +348,12 @@ test safePrimarySelection-2.1 {unsafe slave interpreter, text, no existing selec
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-2.2 {unsafe slave interpreter, entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.2 {unsafe child interpreter, entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryEntry
@@ -365,12 +365,12 @@ test safePrimarySelection-2.2 {unsafe slave interpreter, entry, no existing sele
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-2.3 {unsafe slave interpreter, ttk::entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.3 {unsafe child interpreter, ttk::entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryTtkEntry
@@ -382,12 +382,12 @@ test safePrimarySelection-2.3 {unsafe slave interpreter, ttk::entry, no existing
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-2.4 {unsafe slave interpreter, listbox, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.4 {unsafe child interpreter, listbox, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryListbox
@@ -399,12 +399,12 @@ test safePrimarySelection-2.4 {unsafe slave interpreter, listbox, no existing se
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-2.5 {unsafe slave interpreter, spinbox as entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.5 {unsafe child interpreter, spinbox as entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::trySpinbox 1
@@ -416,12 +416,12 @@ test safePrimarySelection-2.5 {unsafe slave interpreter, spinbox as entry, no ex
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-2.6 {unsafe slave interpreter, spinbox spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.6 {unsafe child interpreter, spinbox spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::trySpinbox 2
@@ -433,12 +433,12 @@ test safePrimarySelection-2.6 {unsafe slave interpreter, spinbox spun, no existi
::_test_tmp::clearPrimarySelection
} -result 2
-test safePrimarySelection-2.7 {unsafe slave interpreter, spinbox spun/selected/spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.7 {unsafe child interpreter, spinbox spun/selected/spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::trySpinbox 3
@@ -450,12 +450,12 @@ test safePrimarySelection-2.7 {unsafe slave interpreter, spinbox spun/selected/s
::_test_tmp::clearPrimarySelection
} -result 3
-test safePrimarySelection-2.8 {unsafe slave interpreter, ttk::spinbox as entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.8 {unsafe child interpreter, ttk::spinbox as entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryTtkSpinbox 1
@@ -467,12 +467,12 @@ test safePrimarySelection-2.8 {unsafe slave interpreter, ttk::spinbox as entry,
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-2.9 {unsafe slave interpreter, ttk::spinbox spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.9 {unsafe child interpreter, ttk::spinbox spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryTtkSpinbox 2
@@ -484,12 +484,12 @@ test safePrimarySelection-2.9 {unsafe slave interpreter, ttk::spinbox spun, no e
::_test_tmp::clearPrimarySelection
} -result 2
-test safePrimarySelection-2.10 {unsafe slave interpreter, ttk::spinbox spun/selected/spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-2.10 {unsafe child interpreter, ttk::spinbox spun/selected/spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryTtkSpinbox 3
@@ -501,13 +501,13 @@ test safePrimarySelection-2.10 {unsafe slave interpreter, ttk::spinbox spun/sele
::_test_tmp::clearPrimarySelection
} -result 3
-test safePrimarySelection-3.1 {IMPORTANT, safe slave interpreter, text, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.1 {IMPORTANT, safe child interpreter, text, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -522,13 +522,13 @@ test safePrimarySelection-3.1 {IMPORTANT, safe slave interpreter, text, no exist
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-3.2 {IMPORTANT, safe slave interpreter, entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.2 {IMPORTANT, safe child interpreter, entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -543,13 +543,13 @@ test safePrimarySelection-3.2 {IMPORTANT, safe slave interpreter, entry, no exis
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-3.3 {IMPORTANT, safe slave interpreter, ttk::entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.3 {IMPORTANT, safe child interpreter, ttk::entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -564,13 +564,13 @@ test safePrimarySelection-3.3 {IMPORTANT, safe slave interpreter, ttk::entry, no
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-3.4 {IMPORTANT, safe slave interpreter, listbox, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.4 {IMPORTANT, safe child interpreter, listbox, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -585,13 +585,13 @@ test safePrimarySelection-3.4 {IMPORTANT, safe slave interpreter, listbox, no ex
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-3.5 {IMPORTANT, safe slave interpreter, spinbox as entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.5 {IMPORTANT, safe child interpreter, spinbox as entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -606,13 +606,13 @@ test safePrimarySelection-3.5 {IMPORTANT, safe slave interpreter, spinbox as ent
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-3.6 {IMPORTANT, safe slave interpreter, spinbox spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.6 {IMPORTANT, safe child interpreter, spinbox spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -627,13 +627,13 @@ test safePrimarySelection-3.6 {IMPORTANT, safe slave interpreter, spinbox spun,
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-3.7 {IMPORTANT, safe slave interpreter, spinbox spun/selected/spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.7 {IMPORTANT, safe child interpreter, spinbox spun/selected/spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -648,13 +648,13 @@ test safePrimarySelection-3.7 {IMPORTANT, safe slave interpreter, spinbox spun/s
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-3.8 {IMPORTANT, safe slave interpreter, ttk::spinbox as entry, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.8 {IMPORTANT, safe child interpreter, ttk::spinbox as entry, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -669,13 +669,13 @@ test safePrimarySelection-3.8 {IMPORTANT, safe slave interpreter, ttk::spinbox a
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-3.9 {IMPORTANT, safe slave interpreter, ttk::spinbox spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.9 {IMPORTANT, safe child interpreter, ttk::spinbox spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -690,13 +690,13 @@ test safePrimarySelection-3.9 {IMPORTANT, safe slave interpreter, ttk::spinbox s
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-3.10 {IMPORTANT, safe slave interpreter, ttk::spinbox spun/selected/spun, no existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-3.10 {IMPORTANT, safe child interpreter, ttk::spinbox spun/selected/spun, no existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::clearPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -711,8 +711,8 @@ test safePrimarySelection-3.10 {IMPORTANT, safe slave interpreter, ttk::spinbox
::_test_tmp::clearPrimarySelection
} -result {----}
-test safePrimarySelection-4.1 {master interpreter, text, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.1 {parent interpreter, text, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -723,8 +723,8 @@ test safePrimarySelection-4.1 {master interpreter, text, existing selection} -se
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-4.2 {master interpreter, entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.2 {parent interpreter, entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -735,8 +735,8 @@ test safePrimarySelection-4.2 {master interpreter, entry, existing selection} -s
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-4.3 {master interpreter, ttk::entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.3 {parent interpreter, ttk::entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -747,8 +747,8 @@ test safePrimarySelection-4.3 {master interpreter, ttk::entry, existing selectio
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-4.4 {master interpreter, listbox, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.4 {parent interpreter, listbox, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -759,8 +759,8 @@ test safePrimarySelection-4.4 {master interpreter, listbox, existing selection}
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-4.5 {master interpreter, spinbox as entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.5 {parent interpreter, spinbox as entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -771,8 +771,8 @@ test safePrimarySelection-4.5 {master interpreter, spinbox as entry, existing se
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-4.6 {master interpreter, spinbox spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.6 {parent interpreter, spinbox spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -783,8 +783,8 @@ test safePrimarySelection-4.6 {master interpreter, spinbox spun, existing select
::_test_tmp::clearPrimarySelection
} -result 2
-test safePrimarySelection-4.7 {master interpreter, spinbox spun/selected/spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.7 {parent interpreter, spinbox spun/selected/spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -795,8 +795,8 @@ test safePrimarySelection-4.7 {master interpreter, spinbox spun/selected/spun, e
::_test_tmp::clearPrimarySelection
} -result 3
-test safePrimarySelection-4.8 {master interpreter, ttk::spinbox as entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.8 {parent interpreter, ttk::spinbox as entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -807,8 +807,8 @@ test safePrimarySelection-4.8 {master interpreter, ttk::spinbox as entry, existi
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-4.9 {master interpreter, ttk::spinbox spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.9 {parent interpreter, ttk::spinbox spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -819,8 +819,8 @@ test safePrimarySelection-4.9 {master interpreter, ttk::spinbox spun, existing s
::_test_tmp::clearPrimarySelection
} -result 2
-test safePrimarySelection-4.10 {master interpreter, ttk::spinbox spun/selected/spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-4.10 {parent interpreter, ttk::spinbox spun/selected/spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
@@ -831,12 +831,12 @@ test safePrimarySelection-4.10 {master interpreter, ttk::spinbox spun/selected/s
::_test_tmp::clearPrimarySelection
} -result 3
-test safePrimarySelection-5.1 {unsafe slave interpreter, text, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.1 {unsafe child interpreter, text, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryText
@@ -848,12 +848,12 @@ test safePrimarySelection-5.1 {unsafe slave interpreter, text, existing selectio
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-5.2 {unsafe slave interpreter, entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.2 {unsafe child interpreter, entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryEntry
@@ -865,12 +865,12 @@ test safePrimarySelection-5.2 {unsafe slave interpreter, entry, existing selecti
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-5.3 {unsafe slave interpreter, ttk::entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.3 {unsafe child interpreter, ttk::entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryTtkEntry
@@ -882,12 +882,12 @@ test safePrimarySelection-5.3 {unsafe slave interpreter, ttk::entry, existing se
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-5.4 {unsafe slave interpreter, listbox, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.4 {unsafe child interpreter, listbox, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryListbox
@@ -899,12 +899,12 @@ test safePrimarySelection-5.4 {unsafe slave interpreter, listbox, existing selec
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-5.5 {unsafe slave interpreter, spinbox as entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.5 {unsafe child interpreter, spinbox as entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::trySpinbox 1
@@ -916,12 +916,12 @@ test safePrimarySelection-5.5 {unsafe slave interpreter, spinbox as entry, exist
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-5.6 {unsafe slave interpreter, spinbox spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.6 {unsafe child interpreter, spinbox spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::trySpinbox 2
@@ -933,12 +933,12 @@ test safePrimarySelection-5.6 {unsafe slave interpreter, spinbox spun, existing
::_test_tmp::clearPrimarySelection
} -result 2
-test safePrimarySelection-5.7 {unsafe slave interpreter, spinbox spun/selected/spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.7 {unsafe child interpreter, spinbox spun/selected/spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::trySpinbox 3
@@ -950,12 +950,12 @@ test safePrimarySelection-5.7 {unsafe slave interpreter, spinbox spun/selected/s
::_test_tmp::clearPrimarySelection
} -result 3
-test safePrimarySelection-5.8 {unsafe slave interpreter, ttk::spinbox as entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.8 {unsafe child interpreter, ttk::spinbox as entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryTtkSpinbox 1
@@ -967,12 +967,12 @@ test safePrimarySelection-5.8 {unsafe slave interpreter, ttk::spinbox as entry,
::_test_tmp::clearPrimarySelection
} -result {PAYLOAD}
-test safePrimarySelection-5.9 {unsafe slave interpreter, ttk::spinbox spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.9 {unsafe child interpreter, ttk::spinbox spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryTtkSpinbox 2
@@ -984,12 +984,12 @@ test safePrimarySelection-5.9 {unsafe slave interpreter, ttk::spinbox spun, exis
::_test_tmp::clearPrimarySelection
} -result 2
-test safePrimarySelection-5.10 {unsafe slave interpreter, ttk::spinbox spun/selected/spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-5.10 {unsafe child interpreter, ttk::spinbox spun/selected/spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
- set int2 slave2
+ set int2 child2
::_test_tmp::unsafeInterp $int2
$int2 eval $::_test_tmp::script
$int2 eval ::_test_tmp::tryTtkSpinbox 3
@@ -1001,13 +1001,13 @@ test safePrimarySelection-5.10 {unsafe slave interpreter, ttk::spinbox spun/sele
::_test_tmp::clearPrimarySelection
} -result 3
-test safePrimarySelection-6.1 {IMPORTANT, safe slave interpreter, text, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.1 {IMPORTANT, safe child interpreter, text, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -1022,13 +1022,13 @@ test safePrimarySelection-6.1 {IMPORTANT, safe slave interpreter, text, existing
::_test_tmp::clearPrimarySelection
} -result {OLD_VALUE----OLD_VALUE}
-test safePrimarySelection-6.2 {IMPORTANT, safe slave interpreter, entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.2 {IMPORTANT, safe child interpreter, entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -1043,13 +1043,13 @@ test safePrimarySelection-6.2 {IMPORTANT, safe slave interpreter, entry, existin
::_test_tmp::clearPrimarySelection
} -result {OLD_VALUE----OLD_VALUE}
-test safePrimarySelection-6.3 {IMPORTANT, safe slave interpreter, ttk::entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.3 {IMPORTANT, safe child interpreter, ttk::entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -1064,13 +1064,13 @@ test safePrimarySelection-6.3 {IMPORTANT, safe slave interpreter, ttk::entry, ex
::_test_tmp::clearPrimarySelection
} -result {OLD_VALUE----OLD_VALUE}
-test safePrimarySelection-6.4 {IMPORTANT, safe slave interpreter, listbox, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.4 {IMPORTANT, safe child interpreter, listbox, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -1085,13 +1085,13 @@ test safePrimarySelection-6.4 {IMPORTANT, safe slave interpreter, listbox, exist
::_test_tmp::clearPrimarySelection
} -result {OLD_VALUE----OLD_VALUE}
-test safePrimarySelection-6.5 {IMPORTANT, safe slave interpreter, spinbox as entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.5 {IMPORTANT, safe child interpreter, spinbox as entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -1106,13 +1106,13 @@ test safePrimarySelection-6.5 {IMPORTANT, safe slave interpreter, spinbox as ent
::_test_tmp::clearPrimarySelection
} -result {OLD_VALUE----OLD_VALUE}
-test safePrimarySelection-6.6 {IMPORTANT, safe slave interpreter, spinbox spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.6 {IMPORTANT, safe child interpreter, spinbox spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -1127,13 +1127,13 @@ test safePrimarySelection-6.6 {IMPORTANT, safe slave interpreter, spinbox spun,
::_test_tmp::clearPrimarySelection
} -result {OLD_VALUE----OLD_VALUE}
-test safePrimarySelection-6.7 {IMPORTANT, safe slave interpreter, spinbox spun/selected/spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.7 {IMPORTANT, safe child interpreter, spinbox spun/selected/spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -1148,13 +1148,13 @@ test safePrimarySelection-6.7 {IMPORTANT, safe slave interpreter, spinbox spun/s
::_test_tmp::clearPrimarySelection
} -result {OLD_VALUE----OLD_VALUE}
-test safePrimarySelection-6.8 {IMPORTANT, safe slave interpreter, ttk::spinbox as entry, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.8 {IMPORTANT, safe child interpreter, ttk::spinbox as entry, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -1169,13 +1169,13 @@ test safePrimarySelection-6.8 {IMPORTANT, safe slave interpreter, ttk::spinbox a
::_test_tmp::clearPrimarySelection
} -result {OLD_VALUE----OLD_VALUE}
-test safePrimarySelection-6.9 {IMPORTANT, safe slave interpreter, ttk::spinbox spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.9 {IMPORTANT, safe child interpreter, ttk::spinbox spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
@@ -1190,13 +1190,13 @@ test safePrimarySelection-6.9 {IMPORTANT, safe slave interpreter, ttk::spinbox s
::_test_tmp::clearPrimarySelection
} -result {OLD_VALUE----OLD_VALUE}
-test safePrimarySelection-6.10 {IMPORTANT, safe slave interpreter, ttk::spinbox spun/selected/spun, existing selection} -setup {
- catch {interp delete slave2}
+test safePrimarySelection-6.10 {IMPORTANT, safe child interpreter, ttk::spinbox spun/selected/spun, existing selection} -setup {
+ catch {interp delete child2}
destroy {*}[winfo children .]
::_test_tmp::setPrimarySelection
} -body {
set res0 [::_test_tmp::getPrimarySelection]
- set int2 slave2
+ set int2 child2
::safe::interpCreate $int2
::safe::loadTk $int2
$int2 eval $::_test_tmp::script
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index e02e3a8..873e564 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -197,7 +197,7 @@ test scrollbar-3.14.1 {ScrollbarWidgetCmd procedure, "cget" option} emptyTest {
destroy .s2
test scrollbar-3.15 {ScrollbarWidgetCmd procedure, "configure" option} {
llength [.s configure]
-} {20}
+} 20
test scrollbar-3.16 {ScrollbarWidgetCmd procedure, "configure" option} {
list [catch {.s configure -bad} msg] $msg
} {1 {unknown option "-bad"}}
@@ -230,7 +230,7 @@ test scrollbar-3.24 {ScrollbarWidgetCmd procedure, "delta" option} {
} {1 {expected integer but got "xxyz"}}
test scrollbar-3.25 {ScrollbarWidgetCmd procedure, "delta" option} {
format {%.6g} [.s delta 20 0]
-} {0}
+} 0
test scrollbar-3.26 {ScrollbarWidgetCmd procedure, "delta" option} {
format {%.6g} [.s delta 0 20]
} [format %.6g [expr {20.0/([getTroughSize .s]-1)}]]
@@ -262,20 +262,20 @@ test scrollbar-3.32 {ScrollbarWidgetCmd procedure, "fraction" option} {
} {1 {expected integer but got "bogus"}}
test scrollbar-3.33 {ScrollbarWidgetCmd procedure, "fraction" option} {
format {%.6g} [.s fraction 0 0]
-} {0}
+} 0
test scrollbar-3.34 {ScrollbarWidgetCmd procedure, "fraction" option} {
format {%.6g} [.s fraction 0 1000]
-} {1}
+} 1
test scrollbar-3.35 {ScrollbarWidgetCmd procedure, "fraction" option} {
format {%.6g} [.s fraction 4 21]
} [format %.6g [expr {(21.0 - ([winfo height .s] - [getTroughSize .s])/2.0) \
/([getTroughSize .s] - 1)}]]
test scrollbar-3.36 {ScrollbarWidgetCmd procedure, "fraction" option} x11 {
format {%.6g} [.s fraction 4 179]
-} {1}
+} 1
test scrollbar-3.37 {ScrollbarWidgetCmd procedure, "fraction" option} {testmetrics} {
format {%.6g} [.s fraction 4 [expr {200 - [testmetrics cyvscroll .s]}]]
-} {1}
+} 1
test scrollbar-3.38 {ScrollbarWidgetCmd procedure, "fraction" option} x11 {
format {%.6g} [.s fraction 4 178]
} {0.993711}
@@ -309,7 +309,7 @@ if {[testConstraint testmetrics]} {
update
test scrollbar-3.42 {ScrollbarWidgetCmd procedure, "fraction" option} {
format {%.6g} [.t.s fraction 100 0]
-} {0}
+} 0
destroy .t
test scrollbar-3.43 {ScrollbarWidgetCmd procedure, "get" option} {
list [catch {.s get a} msg] $msg
diff --git a/tests/send.test b/tests/send.test
index 403a207..aad7032 100644
--- a/tests/send.test
+++ b/tests/send.test
@@ -401,14 +401,14 @@ test send-10.4 {SendEventProc procedure, leading nulls, bogus commands} {secures
set a null
update
set a
-} {44}
+} 44
test send-10.5 {SendEventProc procedure, extraneous command options} {secureserver testsend} {
testsend prop comm Comm \
"c\n-n tktest\n-x miscellanous\n-y who knows?\n-s set a new\n"
set a null
update
set a
-} {new}
+} new
test send-10.6 {SendEventProc procedure, unknown interpreter} {secureserver testsend} {
testsend prop [winfo id .f] Comm {}
testsend prop comm Comm \
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 7a00627..e3c7009 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -12,6 +12,7 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
# For xscrollcommand
+set scrollInfo {}
proc scroll args {
global scrollInfo
set scrollInfo $args
@@ -1871,7 +1872,7 @@ test spinbox-3.79 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
.e insert end "runs off the end of the window quite a bit."
.e xview 0
update
- .e xview -4
+ .e xview -1
.e index @0
} -cleanup {
destroy .e
@@ -2013,9 +2014,10 @@ test spinbox-5.7 {ConfigureSpinbox procedure} -setup {
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
- set timeout [after 500 {set $scrollInfo "timeout"}]
- vwait scrollInfo
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e configure -width 5
+ vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
@@ -2219,8 +2221,9 @@ test spinbox-7.1 {InsertChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 2 XXX
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -2236,8 +2239,9 @@ test spinbox-7.2 {InsertChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 500 XXX
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -2370,8 +2374,9 @@ test spinbox-8.1 {DeleteChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e delete 2 4
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -2386,8 +2391,9 @@ test spinbox-8.2 {DeleteChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- .e delete -2 2
- set timeout [after 500 {set $scrollInfo "timeout"}]
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ .e delete -1 2
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -2402,8 +2408,9 @@ test spinbox-8.3 {DeleteChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e delete 3 1000
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
@@ -3115,7 +3122,7 @@ test spinbox-13.23 {GetSpinboxIndex procedure} -body {
.e insert 0 012345678901234567890
.e xview 4
update
- .e index -10
+ .e index -1
} -cleanup {
destroy .e
} -result 0
@@ -3203,9 +3210,10 @@ 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
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e delete 0 end
.e insert 0 123
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
@@ -3216,8 +3224,9 @@ test spinbox-17.2 {SpinboxUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
.e insert 0 0123456789abcdef
+ update idletasks
+ set timeout [after 500 {set $scrollInfo {-1000000 -1000000}}]
.e xview 3
- set timeout [after 500 {set $scrollInfo "timeout"}]
vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
@@ -3227,23 +3236,26 @@ 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
+ update idletasks
+ set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 abcdefghijklmnopqrs
- .e xview 6
- set timeout [after 500 {set $scrollInfo "timeout"}]
+ .e xview
vwait scrollInfo
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
after cancel $timeout
-} -result {0.315789 0.842105}
+} -result {0.000000 0.526316}
test spinbox-17.4 {SpinboxUpdateScrollbar procedure} -setup {
proc bgerror msg {
global x
set x $msg
}
} -body {
- spinbox .e -width 5 -xscrollcommand thisisnotacommand
+ spinbox .e -width 5
pack .e
+ update idletasks
+ .e configure -xscrollcommand thisisnotacommand
vwait x
list $x $errorInfo
} -cleanup {
diff --git a/tests/text.test b/tests/text.test
index 720ada8..8bf65d3 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -3488,7 +3488,7 @@ test text-14.18 {ConfigureText procedure} -constraints fonts -setup {
# to the appropriate size.
# On macOS, however, there is no way to make the window overlap the menubar.
if {[tk windowingsystem] == "aqua"} {
- set minY 23
+ set minY [expr [menubarheight] + 1]
} else {
set minY 0
}
@@ -7052,13 +7052,13 @@ test text-28.1 {bug fix - 624372, ControlUtfProc long lines} -body {
test text-29.1 {tabs - must be positive and must be increasing} -body {
pack [text .t -wrap none]
- .t configure -tabs {0}
+ .t configure -tabs 0
} -cleanup {
destroy .t
} -returnCodes {error} -result {tab stop "0" is not at a positive distance}
test text-29.2 {tabs - must be positive and must be increasing} -body {
pack [text .t -wrap none]
- .t configure -tabs {-5}
+ .t configure -tabs -5
} -cleanup {
destroy .t
} -returnCodes {error} -result {tab stop "-5" is not at a positive distance}
@@ -7688,7 +7688,7 @@ test text-33.7 {peer widget -start, -end} -body {
return $res
} -cleanup {
destroy .t
-} -returnCodes {2} -result {}
+} -returnCodes 2 -result {}
test text-33.8 {peer widget -start, -end} -body {
text .t
for {set i 1} {$i < 100} {incr i} {
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 6ab60af..aeb1a70 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -17,10 +17,20 @@ if {[tk windowingsystem] == "aqua"} {
proc updateText {} {
update idletasks
}
+ proc delay {} {
+ update idletasks
+ after 100
+ update idletasks
+ }
} else {
proc updateText {} {
update
}
+ proc delay {} {
+ update
+ after 100
+ update
+ }
}
# The procedure below is used as the scrolling command for the text;
@@ -213,9 +223,9 @@ test textDisp-1.1 {GetStyle procedure, priorities and tab stops} {
.t delete 1.0 end
.t insert 1.0 "x\ty"
.t tag delete x y z
- .t tag configure x -tabs {50}
+ .t tag configure x -tabs 50
.t tag configure y -foreground black
- .t tag configure z -tabs {70}
+ .t tag configure z -tabs 70
.t tag add x 1.0 1.end
.t tag add y 1.0 1.end
.t tag add z 1.0 1.end
@@ -223,7 +233,7 @@ test textDisp-1.1 {GetStyle procedure, priorities and tab stops} {
set x [lindex [.t bbox 1.2] 0]
.t tag configure z -tabs {}
lappend x [lindex [.t bbox 1.2] 0]
- .t tag configure z -tabs {30}
+ .t tag configure z -tabs 30
.t tag raise x
update idletasks
lappend x [lindex [.t bbox 1.2] 0]
@@ -494,7 +504,7 @@ test textDisp-2.24 {LayoutDLine, tabs, saving from first chunk} {textfonts} {
.t tag add x 1.0 end
.t tag add y 1.1 end
lindex [.t bbox 1.3] 0
-} {75}
+} 75
test textDisp-2.25 {LayoutDLine, tabs, breaking chunks at tabs} {textfonts} {
.t delete 1.0 end
.t tag delete x
@@ -708,7 +718,7 @@ test textDisp-4.12 {UpdateDisplayInfo, filling in extra vertical space} {
.t yview moveto 1
updateText
winfo ismapped .b
-} {0}
+} 0
.t configure -wrap word
.t delete 1.0 end
.t insert end "Line 1\nLine 2\nLine 3\nLine 4\nLine 5\nLine 6\nLine 7\n"
@@ -1818,7 +1828,7 @@ test textDisp-13.11 {TkTextSeeCmd procedure} {} {
set res [.top2.t2 compare $ref == $new]
destroy .top2
set res
-} {0}
+} 0
wm geom . {}
.t configure -wrap none
@@ -2007,7 +2017,7 @@ test textDisp-15.8 {Scrolling near end of window} {
set res [.tf.f.t compare $newind > $refind]
destroy .tf
set res
-} {1}
+} 1
.t configure -wrap char
.t delete 1.0 end
@@ -2167,7 +2177,7 @@ test textDisp-16.28 {TkTextYviewCmd procedure, "scroll" option, forward pages} {
incr res -1
}
set res
-} {102}
+} 102
test textDisp-16.29 {TkTextYviewCmd procedure, "scroll" option, forward pages} {
.t configure -height 1
updateText
@@ -2635,66 +2645,66 @@ test textDisp-19.11 {GetYView procedure} {
} {0.5 1.0}
test textDisp-19.11.2 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines 1.0 end
-} {20}
+} 20
test textDisp-19.11.3 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines end 1.0
-} {-20}
+} -20
test textDisp-19.11.4 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines 1.1 1.3
-} {0}
+} 0
test textDisp-19.11.5 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines 16.0 16.1
-} {0}
+} 0
test textDisp-19.11.5.1 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines 16.0 16.5
-} {0}
+} 0
test textDisp-19.11.6 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines 16.0 16.24
-} {1}
+} 1
test textDisp-19.11.7 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines 16.0 16.40
-} {2}
+} 2
test textDisp-19.11.8 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines "16.0 displaylineend +1c" "16.0 lineend"
-} {3}
+} 3
test textDisp-19.11.9 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines 16.0 "16.0 lineend"
-} {4}
+} 4
test textDisp-19.11.10 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines 16.0 "16.0 +4displaylines"
-} {4}
+} 4
test textDisp-19.11.11 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines 16.0 "16.0 +2displaylines"
-} {2}
+} 2
test textDisp-19.11.12 {TextWidgetCmd procedure, "count -displaylines"} {
.t count -displaylines "16.0 +1displayline" "16.0 +2displaylines -1c"
-} {0}
+} 0
.t tag configure elide -elide 1
test textDisp-19.11.13 {TextWidgetCmd procedure, "count -displaylines"} {
.t tag remove elide 1.0 end
.t tag add elide "16.0 +1displaylines" "16.0 +1displaylines +6c"
.t count -displaylines 16.0 "16.0 +4displaylines"
-} {4}
+} 4
test textDisp-19.11.14 {TextWidgetCmd procedure, "count -displaylines"} {
.t tag remove elide 1.0 end
.t tag add elide "16.0 +1displaylines" "16.0 +1displaylines displaylineend"
.t count -displaylines 16.0 "16.0 +4displaylines"
-} {4}
+} 4
test textDisp-19.11.15 {TextWidgetCmd procedure, "count -displaylines"} {
.t tag remove elide 1.0 end
.t tag add elide "16.0 +1displaylines" "16.0 +2displaylines"
.t count -displaylines 16.0 "16.0 +4displaylines -1c"
-} {3}
+} 3
test textDisp-19.11.15a {TextWidgetCmd procedure, "count -displaylines"} {
.t tag remove elide 1.0 end
.t tag add elide "16.0 +1displaylines" "16.0 +2displaylines"
.t count -displaylines 16.0 "16.0 +4displaylines"
-} {4}
+} 4
test textDisp-19.11.16 {TextWidgetCmd procedure, "count -displaylines"} {
.t tag remove elide 1.0 end
.t tag add elide "12.0" "14.0"
.t count -displaylines 12.0 16.0
-} {2}
+} 2
test textDisp-19.11.17 {TextWidgetCmd procedure, "index +displaylines"} {
.t tag remove elide 1.0 end
.t tag add elide "12.0" "14.0"
@@ -2715,7 +2725,7 @@ test textDisp-19.11.19 {TextWidgetCmd procedure, "count -displaylines"} {
.t tag remove elide 1.0 end
.t tag add elide "12.0" "16.0 +1displaylines"
.t count -displaylines 12.0 17.0
-} {4}
+} 4
test textDisp-19.11.20 {TextWidgetCmd procedure, "index +displaylines"} {
.t tag remove elide 1.0 end
.t tag add elide "12.0" "16.0 +1displaylines"
@@ -3482,7 +3492,7 @@ test textDisp-26.5 {AdjustForTab procedure, numeric alignment} {
.t tag add y 1.2
.t tag add y 1.5
lindex [.t bbox 1.3] 0
-} {120}
+} 120
test textDisp-26.6 {AdjustForTab procedure, numeric alignment} {
.t delete 1.0 end
.t insert 1.0 a\t1,456.234
@@ -3491,7 +3501,7 @@ test textDisp-26.6 {AdjustForTab procedure, numeric alignment} {
.t tag add x 1.0 end
.t tag add y 1.2
lindex [.t bbox 1.7] 0
-} {120}
+} 120
test textDisp-26.7 {AdjustForTab procedure, numeric alignment} {
.t delete 1.0 end
.t insert 1.0 a\t1.456.234,7
@@ -3500,7 +3510,7 @@ test textDisp-26.7 {AdjustForTab procedure, numeric alignment} {
.t tag add x 1.0 end
.t tag add y 1.2
lindex [.t bbox 1.11] 0
-} {120}
+} 120
test textDisp-26.8 {AdjustForTab procedure, numeric alignment} {
.t delete 1.0 end
.t insert 1.0 a\ttest
@@ -3509,7 +3519,7 @@ test textDisp-26.8 {AdjustForTab procedure, numeric alignment} {
.t tag add x 1.0 end
.t tag add y 1.2
lindex [.t bbox 1.6] 0
-} {120}
+} 120
test textDisp-26.9 {AdjustForTab procedure, numeric alignment} {
.t delete 1.0 end
.t insert 1.0 a\t1234
@@ -3518,7 +3528,7 @@ test textDisp-26.9 {AdjustForTab procedure, numeric alignment} {
.t tag add x 1.0 end
.t tag add y 1.2
lindex [.t bbox 1.6] 0
-} {120}
+} 120
test textDisp-26.10 {AdjustForTab procedure, numeric alignment} {
.t delete 1.0 end
.t insert 1.0 a\t1.234567
@@ -3527,7 +3537,7 @@ test textDisp-26.10 {AdjustForTab procedure, numeric alignment} {
.t tag add x 1.0 end
.t tag add y 1.5
lindex [.t bbox 1.3] 0
-} {120}
+} 120
test textDisp-26.11 {AdjustForTab procedure, numeric alignment} {
.t delete 1.0 end
.t insert 1.0 a\tx=1.234567
@@ -3537,7 +3547,7 @@ test textDisp-26.11 {AdjustForTab procedure, numeric alignment} {
.t tag add y 1.7
.t tag add y 1.9
lindex [.t bbox 1.5] 0
-} {120}
+} 120
test textDisp-26.12 {AdjustForTab procedure, adjusting chunks} {
.t delete 1.0 end
.t insert 1.0 a\tx1.234567
@@ -3550,7 +3560,7 @@ test textDisp-26.12 {AdjustForTab procedure, adjusting chunks} {
.t window create 1.3 -window .b
updateText
lindex [.t bbox 1.5] 0
-} {120}
+} 120
test textDisp-26.13 {AdjustForTab procedure, not enough space} {textfonts} {
.t delete 1.0 end
.t insert 1.0 "abc\txyz\tqrs\txyz\t0"
@@ -3707,7 +3717,7 @@ test textDisp-27.7.2 {SizeOfTab procedure, fractional tab interpolation problem}
.t configure -tabs $precisetab
updateText
expr {[lindex $res 0] - [lindex [.t bbox 1.20] 0]}
-} {0}
+} 0
.t configure -wrap char -tabs {} -width 20
updateText
@@ -3723,7 +3733,7 @@ test textDisp-27.9 {SizeOfTab procedure, left alignment} {textfonts} {
.t delete 1.0 end
.t insert 1.0 a\txyzzyabc
.t tag delete x
- .t tag configure x -tabs {120}
+ .t tag configure x -tabs 120
.t tag add x 1.0 end
list [.t bbox 1.3] [.t bbox 1.4]
} [list [list 131 5 13 $fixedHeight] [list 4 [expr {$fixedDiff + 18}] 7 $fixedHeight]]
@@ -3739,7 +3749,7 @@ test textDisp-27.11 {SizeOfTab procedure, making tabs at least as wide as a spac
.t delete 1.0 end
.t insert 1.0 abc\tdefghijklmnopqrst
.t tag delete x
- .t tag configure x -tabs {120}
+ .t tag configure x -tabs 120
.t tag add x 1.0 end
list [.t bbox 1.5] [.t bbox 1.6]
} [list [list 131 5 13 $fixedHeight] [list 4 [expr {$fixedDiff + 18}] 7 $fixedHeight]]
@@ -3912,14 +3922,14 @@ test textDisp-30.1 {elidden text joining multiple logical lines} {
.t2.t tag configure elidden -elide 1 -background red
.t2.t tag add elidden 1.2 3.2
.t2.t count -displaylines 1.0 end
-} {1}
+} 1
test textDisp-30.2 {elidden text joining multiple logical lines} {
.t2.t delete 1.0 end
.t2.t insert 1.0 "1111\n2222\n3333"
.t2.t tag configure elidden -elide 1 -background red
.t2.t tag add elidden 1.2 2.2
.t2.t count -displaylines 1.0 end
-} {2}
+} 2
catch {destroy .t2}
.t configure -height 1
@@ -3969,12 +3979,12 @@ test textDisp-31.3 {line update index shifting} {
.t insert 1.0 "abc\n"
.t insert 1.0 "abc\n"
lappend res [.t count -ypixels 1.0 end]
- update ; after 1000 ; update
+ delay
lappend res [.t count -ypixels 1.0 end]
.t.f configure -height 100
.t delete 1.0 3.0
lappend res [.t count -ypixels 1.0 end]
- update ; after 1000 ; update
+ delay
lappend res [.t count -ypixels 1.0 end]
set res
} [list [expr {100 + $fixedHeight * 6}] [expr {100 + $fixedHeight * 8}] [expr {$fixedHeight * 9}] [expr {$fixedHeight * 7}] [expr {100 + $fixedHeight * 6}]]
@@ -4022,12 +4032,12 @@ test textDisp-31.6 {line update index shifting} {
.t insert 1.0 "abc\n"
.t insert 1.0 "abc\n"
lappend res [.t count -ypixels 1.0 end]
- update ; after 1000 ; update
+ delay
lappend res [.t count -ypixels 1.0 end]
textest configure -height 100
.t delete 1.0 3.0
lappend res [.t count -ypixels 1.0 end]
- update ; after 1000 ; update
+ delay
lappend res [.t count -ypixels 1.0 end]
set res
} [list [expr {100 + $fixedHeight * 6}] [expr {100 + $fixedHeight * 8}] [expr {$fixedHeight * 9}] [expr {$fixedHeight * 7}] [expr {100 + $fixedHeight * 6}]]
@@ -4044,11 +4054,11 @@ test textDisp-31.7 {line update index shifting, elided} {
.t tag configure elide -elide 1
.t tag add elide 1.3 2.1
lappend res [.t count -ypixels 1.0 end]
- update ; after 1000 ; update
+ delay
lappend res [.t count -ypixels 1.0 end]
.t delete 1.0 3.0
lappend res [.t count -ypixels 1.0 end]
- update ; after 1000 ; update
+ delay
lappend res [.t count -ypixels 1.0 end]
set res
} [list [expr {$fixedHeight * 1}] [expr {$fixedHeight * 3}] [expr {$fixedHeight * 3}] [expr {$fixedHeight * 2}] [expr {$fixedHeight * 1}] [expr {$fixedHeight * 1}]]
@@ -4183,6 +4193,7 @@ test textDisp-32.3 "NULL undisplayProc problems: #1791052" -setup {
test textDisp-33.0 {one line longer than fits in the widget} {
pack [text .tt -wrap char]
+ updateText
.tt insert 1.0 [string repeat "more wrap + " 300]
updateText
.tt see 1.0
@@ -4191,6 +4202,7 @@ test textDisp-33.0 {one line longer than fits in the widget} {
test textDisp-33.1 {one line longer than fits in the widget} {
destroy .tt
pack [text .tt -wrap char]
+ updateText
.tt insert 1.0 [string repeat "more wrap + " 300]
updateText
.tt yview "1.0 +1 displaylines"
@@ -4204,12 +4216,14 @@ test textDisp-33.2 {one line longer than fits in the widget} {
destroy .tt
pack [text .tt -wrap char]
.tt debug 1
+ updateText
set tk_textHeightCalc ""
+ set timer [after 200 lappend tk_textHeightCalc "Timed out"]
.tt insert 1.0 [string repeat "more wrap + " 1]
- after 100 ; update idletasks
- # Nothing should have been recalculated.
+ vwait tk_textHeightCalc
+ after cancel $timer
set tk_textHeightCalc
-} {}
+} {1.0}
test textDisp-33.3 {one line longer than fits in the widget} {
destroy .tt
pack [text .tt -wrap char]
@@ -4222,7 +4236,7 @@ test textDisp-33.3 {one line longer than fits in the widget} {
# Each line should have been recalculated just once
.tt debug 0
expr {[llength $tk_textHeightCalc] == [.tt count -displaylines 1.0 end]}
-} {1}
+} 1
test textDisp-33.4 {one line longer than fits in the widget} {
destroy .tt
pack [text .tt -wrap char]
diff --git a/tests/textIndex.test b/tests/textIndex.test
index 310db6a..646c0a3 100644
--- a/tests/textIndex.test
+++ b/tests/textIndex.test
@@ -809,7 +809,7 @@ test textIndex-19.12.1 {Display lines} {
test textIndex-19.12.2 {Display lines} {
.t compare [.t index "2.50 + 100 displaylines"] == "end - 1 c"
-} {1}
+} 1
test textIndex-19.13 {Display lines} {
destroy {*}[pack slaves .]
diff --git a/tests/textWind.test b/tests/textWind.test
index eac4827..82d3269 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -13,7 +13,7 @@ tcltest::loadTestedCommands
deleteWindows
-set fixedFont {"Courier New" -12}
+set fixedFont {"Courier" -12}
set fixedHeight [font metrics $fixedFont -linespace]
set fixedWidth [font measure $fixedFont m]
set fixedAscent [font metrics $fixedFont -ascent]
@@ -751,15 +751,17 @@ test textWind-10.5 {EmbWinLayoutProc procedure, error in creating window} -setup
destroy .t.f
proc bgerror args {
global msg
- lappend msg $args
+ if {$msg == ""} {
+ lappend msg $args
+ }
}
} -body {
.t insert 1.0 "Some sample text"
+ set msg {}
.t window create 1.5 -create {
frame .t.f
frame .t.f.f -width 10 -height 20 -bg $color
}
- set msg {}
update idletasks
lappend msg [winfo exists .t.f.f]
} -cleanup {
diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test
index 2573e57..4bdabee 100644
--- a/tests/ttk/spinbox.test
+++ b/tests/ttk/spinbox.test
@@ -204,16 +204,19 @@ test spinbox-3.0 "textarea should expand to fill widget" -setup {
set ::spinbox_test {}
ttk::spinbox .sb -from 0 -to 10 -textvariable SBV
} -body {
- grid .sb -sticky ew
grid columnconfigure . 0 -weight 1
+ update idletasks
+ set timer [after 500 {set ::spinbox_test timedout}]
bind . <Map> {
after idle {
wm geometry . "210x80"
- after 100 {set ::spinbox_test [.sb identify element 5 5]}
+ update idletasks
+ set ::spinbox_test [.sb identify element 25 5]
}
bind . <Map> {}
}
- after 500 {set ::spinbox_wait 1} ; vwait ::spinbox_wait
+ grid .sb -sticky ew
+ vwait ::spinbox_test
set ::spinbox_test
} -cleanup {
destroy .sb
diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test
index b322ef7..2496c43 100644
--- a/tests/unixEmbed.test
+++ b/tests/unixEmbed.test
@@ -1238,13 +1238,12 @@ test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -con
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
- update
pack .f1
- update
+ update idletasks
toplevel .t1 -use [winfo id .f1] -width 150 -height 80
- update
+ update idletasks
wm geometry .t1 +40+50
- update
+ update idletasks
wm geometry .t1
} -cleanup {
deleteWindows
@@ -1256,10 +1255,11 @@ test unixEmbed-10.2 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -con
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
+ update idletasks
toplevel .t1 -use [winfo id .f1] -width 150 -height 80
- update
+ update idletasks
wm geometry .t1 70x300+10+20
- update
+ update idletasks
wm geometry .t1
} -cleanup {
deleteWindows
diff --git a/tests/unixFont.test b/tests/unixFont.test
index 177dab5..d7a989a 100644
--- a/tests/unixFont.test
+++ b/tests/unixFont.test
@@ -71,7 +71,7 @@ test unixfont-1.1 {TkpGetNativeFont procedure: not native} {x11 noExceed} {
} {1 {font "" doesn't exist}}
test unixfont-1.2 {TkpGetNativeFont procedure: native} x11 {
font measure fixed 0
-} {6}
+} 6
test unixfont-2.1 {TkpGetFontFromAttributes procedure: no family} x11 {
font actual {-size 10}
@@ -116,7 +116,7 @@ test unixfont-2.9 {TkpGetFontFromAttributes: reject adobe courier if possible} {
} {courier}
test unixfont-2.10 {TkpGetFontFromAttributes: scalable font found} x11 {
lindex [font actual {-family courier -size 37}] 3
-} {37}
+} 37
test unixfont-2.11 {TkpGetFontFromAttributes: font cannot be loaded} x11 {
# On Linux, XListFonts() was returning names for fonts that do not
# actually exist, causing the subsequent XLoadQueryFont() to fail
@@ -174,7 +174,7 @@ test unixfont-5.9 {Tk_MeasureChars procedure: TK_PARTIAL_OK} x11 {
.b.c dchars $t 0 end
.b.c insert $t 0 "0000"
.b.c index $t @[expr int($ax*2.5)],1
-} {2}
+} 2
test unixfont-5.10 {Tk_MeasureChars procedure: TK_AT_LEAST_ONE} x11 {
.b.l config -text "000000000000"
getsize
@@ -243,7 +243,7 @@ test unixfont-8.1 {AllocFont procedure: use old font} x11 {
} {}
test unixfont-8.2 {AllocFont procedure: parse information from XLFD} x11 {
expr {[lindex [font actual {-family times -size 0}] 3] == 0}
-} {0}
+} 0
test unixfont-8.3 {AllocFont procedure: can't parse info from name} x11 {
catch {unset fontArray}
# check that font actual returns the correct attributes.
@@ -263,7 +263,7 @@ test unixfont-8.4 {AllocFont procedure: classify characters} x11 {
} [expr $cx*13]
test unixfont-8.5 {AllocFont procedure: setup widths of normal chars} x11 {
font metrics $courier -fixed
-} {1}
+} 1
test unixfont-8.6 {AllocFont procedure: setup widths of special chars} x11 {
set x 0
incr x [font measure $courier "\001"] ;# 4
diff --git a/tests/unixWm.test b/tests/unixWm.test
index 28c8159..3c9e46e 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -19,16 +19,6 @@ proc sleep ms {
vwait x
}
-# The macOS window manager shows an animation when a window is deiconified.
-# Tests which check the geometry of a window after deiconifying it should
-# wait for the animation to finish.
-
- proc animationDelay {} {
- if {[tk windowingsystem] == "aqua"} {
- sleep 250
- }
- }
-
# Procedure to set up a collection of top-level windows
proc makeToplevels {} {
@@ -46,9 +36,10 @@ proc makeToplevels {} {
# larger than the height of the menubar (normally 23 pixels).
if {[tk windowingsystem] eq "aqua"} {
- set Y0 23
- set Y2 25
- set Y5 28
+ set mb [expr [menubarheight] + 1]
+ set Y0 $mb
+ set Y2 [expr $mb + 2]
+ set Y5 [expr $mb + 5]
} else {
set Y0 0
set Y2 2
@@ -56,7 +47,7 @@ if {[tk windowingsystem] eq "aqua"} {
}
set i 1
-foreach geom "+23+80 +80+23 +0+$Y0" {
+foreach geom "+$Y0+80 +80+$Y0 +0+$Y0" {
destroy .t
test unixWm-1.$i {initial window position} unix {
toplevel .t -width 200 -height 150
@@ -82,7 +73,7 @@ update
scan [wm geom .t] %dx%d+%d+%d width height x y
set xerr [expr 150-$x]
set yerr [expr 150-$y]
-foreach geom "+20+80 +80+23 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
+foreach geom "+20+80 +80+$Y0 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
test unixWm-2.$i {moving window while mapped} unix {
wm geom .t $geom
update
@@ -94,14 +85,14 @@ foreach geom "+20+80 +80+23 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
}
set i 1
-foreach geom "+20+80 +80+23 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
+foreach geom "+20+80 +80+$Y0 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
test unixWm-3.$i {moving window while iconified} unix {
wm iconify .t
- sleep 200
+ update idletasks
wm geom .t $geom
- update
+ update idletasks
wm deiconify .t
- animationDelay
+ update idletasks
scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign \
[eval expr $y$ysign$yerr]
@@ -113,11 +104,11 @@ set i 1
foreach geom "+20+80 +100+40 +0+$Y0" {
test unixWm-4.$i {moving window while withdrawn} unix {
wm withdraw .t
- sleep 200
+ update idletasks
wm geom .t $geom
- update
+ update idletasks
wm deiconify .t
- animationDelay
+ update idletasks
wm geom .t
} 100x150$geom
incr i
@@ -194,27 +185,27 @@ test unixWm-5.7 {compounded state changes} {unix nonPortable} {
destroy .t
toplevel .t -width 200 -height 100
-wm geom .t +10+23
+wm geom .t +10+$Y0
wm minsize .t 1 1
update
test unixWm-6.1 {size changes} unix {
.t config -width 180 -height 150
update
wm geom .t
-} 180x150+10+23
+} 180x150+10+$Y0
test unixWm-6.2 {size changes} unix {
wm geom .t 250x60
.t config -width 170 -height 140
update
wm geom .t
-} 250x60+10+23
+} 250x60+10+$Y0
test unixWm-6.3 {size changes} unix {
wm geom .t 250x60
.t config -width 170 -height 140
wm geom .t {}
update
wm geom .t
-} 170x140+10+23
+} 170x140+10+$Y0
test unixWm-6.4 {size changes} {unix nonPortable userInteraction} {
wm minsize .t 1 1
update
@@ -301,6 +292,7 @@ test unixWm-8.4 {icon windows} unix {
destroy .icon
toplevel .t -width 100 -height 30
wm geom .t +0+0
+ update idletasks
set result [wm iconwindow .t]
toplevel .icon -width 50 -height 50 -bg red
wm iconwindow .t .icon
@@ -310,7 +302,7 @@ test unixWm-8.4 {icon windows} unix {
update
lappend result [winfo ismapped .t] [winfo ismapped .icon]
wm iconify .t
- update
+ update idletasks
lappend result [winfo ismapped .t] [winfo ismapped .icon]
} {.icon icon {} withdrawn 1 0 0 0}
test unixWm-8.5 {icon windows} unix {
@@ -348,7 +340,6 @@ test unixWm-8.8 {icon windows} unix {
wm geom .t +0+0
tkwait visibility .t ;# Needed to keep tvtwm happy.
wm iconwindow .t .icon
- sleep 500
lappend result [winfo ismapped .t] [winfo ismapped .icon]
} {1 1 0}
test unixWm-8.9 {icon windows} {unix nonPortable} {
@@ -420,25 +411,23 @@ test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} unix {
toplevel .t -width 100 -height 300 -bg blue
wm geom .t +0+0
wm iconify .t
- sleep 500
winfo ismapped .t
-} {0}
+} 0
test unixWm-9.4 {TkWmMapWindow procedure, icon windows} unix {
destroy .t
- sleep 500
toplevel .t -width 100 -height 50 -bg blue
tkwait visibility .t
wm iconwindow . .t
update
set result [winfo ismapped .t]
-} {0}
+} 0
test unixWm-9.5 {TkWmMapWindow procedure, normal windows} unix {
destroy .t
toplevel .t -width 200 -height 20
wm geom .t +0+0
update
winfo ismapped .t
-} {1}
+} 1
test unixWm-10.1 {TkWmDeadWindow procedure, canceling UpdateGeometry idle handler} unix {
destroy .t
@@ -672,7 +661,7 @@ test unixWm-18.1 {Tk_WmCmd procedure, "frame" option} unix {
} {1 {wrong # args: should be "wm frame window"}}
test unixWm-18.2 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} {
expr [wm frame .t] == [winfo id .t]
-} {0}
+} 0
test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} {
destroy .t2
toplevel .t2
@@ -682,7 +671,7 @@ test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} {
set result [expr [wm frame .t2] == [winfo id .t2]]
destroy .t2
set result
-} {1}
+} 1
test unixWm-19.1 {Tk_WmCmd procedure, "geometry" option} unix {
list [catch {wm geometry .t 12 13} msg] $msg
@@ -793,7 +782,7 @@ test unixWm-21.4 {Tk_WmCmd procedure, "group" option, make window exist} {unix t
set result [expr [testwrapper .t2] - [lindex $hints 8]]
destroy .t2
set result
-} {0}
+} 0
test unixWm-21.5 {Tk_WmCmd procedure, "group" option, create leader wrapper} {unix testwrapper} {
destroy .t2
destroy .t3
@@ -866,21 +855,21 @@ test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} unix {
destroy .t2
toplevel .t2
wm geom .t2 +0+0
- update
+ update idletasks
wm iconify .t2
- update
+ update idletasks
set result [winfo ismapped .t2]
destroy .t2
set result
-} {0}
+} 0
test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} unix {
destroy .t2
toplevel .t2
wm geom .t2 -0+0
- update
+ update idletasks
set result [winfo ismapped .t2]
wm iconify .t2
- update
+ update idletasks
lappend result [winfo ismapped .t2]
destroy .t2
set result
@@ -1384,12 +1373,13 @@ test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already
test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} unix {
destroy .t
toplevel .t -width 400 -height 150
- wm geometry .t +0+0
tkwait visibility .t
+ wm geometry .t +0+0
+ update idletasks
set result {}
lappend result [winfo width .t] [winfo height .t]
.t configure -width 200 -height 300
- sleep 500
+ update idletasks
lappend result [winfo width .t] [winfo height .t]
} {400 150 200 300}
test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} {
@@ -1453,11 +1443,11 @@ test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} unix {
bind .t <Unmap> {set x "unmapped"}
set x {no event}
wm iconify .t
- animationDelay
+ update idletasks
lappend result $x [winfo ismapped .t]
set x {no event}
wm deiconify .t
- animationDelay
+ update idletasks
lappend result $x [winfo ismapped .t]
} {unmapped 0 mapped 1}
@@ -1744,10 +1734,10 @@ test unixWm-48.10 {ParseGeometry procedure} unix {
} {1 {bad geometry specifier "+20+10z"}}
test unixWm-48.11 {ParseGeometry procedure} unix {
catch {wm geometry .t +-10+20}
-} {0}
+} 0
test unixWm-48.12 {ParseGeometry procedure} unix {
catch {wm geometry .t +30+-10}
-} {0}
+} 0
test unixWm-48.13 {ParseGeometry procedure, resize causes window to move} unix {
destroy .t
toplevel .t -width 200 -height 200
@@ -1953,13 +1943,13 @@ test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} unix {
test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix {
destroy .t
toplevel .t -width 400 -height 300 -bg green
- wm geom .t +0+0
+ wm geom .t +0+30
frame .t.f -width 200 -height 100 -bd 2 -relief raised
place .t.f -x 100 -y 100
frame .t.f.f -width 200 -height 100 -bd 2 -relief raised
place .t.f.f -x 100 -y 0
update
- set x [winfo rooty .t]
+ set x [winfo rootx .t]
set y [expr [winfo rooty .t] + 150]
list [winfo containing [expr $x + 50] $y] \
[winfo containing [expr $x + 150] $y] \
@@ -1970,7 +1960,6 @@ test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix {
test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} unix {
destroy .t
destroy .t2
- sleep 500 ;# Give window manager time to catch up.
toplevel .t -width 200 -height 200 -bg green
wm geometry .t +0+0
tkwait visibility .t
@@ -1979,7 +1968,7 @@ test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} unix {
tkwait visibility .t2
set result [list [winfo containing 100 100]]
wm iconify .t2
- animationDelay
+ update idletasks
lappend result [winfo containing 100 100]
} {.t2 .t}
test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} unix {
@@ -1989,9 +1978,10 @@ test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} unix {
frame .t.f -width 150 -height 150 -bd 2 -relief raised
place .t.f -x 25 -y 25
tkwait visibility .t.f
+ update idletasks
set result [list [winfo containing 100 100]]
place forget .t.f
- update
+ update idletasks
lappend result [winfo containing 100 100]
} {.t.f .t}
deleteWindows
@@ -2021,7 +2011,6 @@ test unixWm-51.3 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable}
set result [winfo containing [winfo rootx .raise1] \
[winfo rooty .raise1]]
destroy .raise2
- sleep 500
list $result [winfo containing [winfo rootx .raise1] \
[winfo rooty .raise1]]
} {.raise2 .raise1}
@@ -2032,7 +2021,6 @@ test unixWm-51.4 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable}
lower .raise3 .raise1
set result [winfo containing 100 100]
destroy .raise1
- sleep 500
lappend result [winfo containing 100 100]
} {.raise1 .raise3}
test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
@@ -2047,7 +2035,6 @@ test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable}
set result [winfo containing [winfo rootx .raise1] \
[winfo rooty .raise1]]
destroy .raise1
- sleep 500
list $result [winfo containing [winfo rootx .raise2] \
[winfo rooty .raise2]]
} {.raise1 .raise3}
@@ -2070,11 +2057,9 @@ test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} unix
wm geometry $w +0+0
}
raise .t .t2
- sleep 2000
update
set result [list [winfo containing 100 100]]
lower .t3
- sleep 2000
lappend result [winfo containing 100 100]
} {.t3 .t}
test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix {
@@ -2250,7 +2235,7 @@ test unixWm-54.2 {TkpMakeMenuWindow procedure, setting override_redirect} {unix
set result [wm overrideredirect .m]
destroy .m
set result
-} {1}
+} 1
# No tests for TkGetPointerCoords, CreateWrapper, or GetMaxSize.
diff --git a/tests/winSend.test b/tests/winSend.test
index 31c800e..9286884 100644
--- a/tests/winSend.test
+++ b/tests/winSend.test
@@ -152,7 +152,7 @@ test winSend-3.1 {TkGetInterpNames} winSend {
set origLength [llength $currentInterps]
set newLength [llength [winfo interps]]
expr {($newLength - 2) == $origLength}
-} {1}
+} 1
test winSend-4.1 {DeleteProc - changing name of app} winSend {
newApp a
@@ -171,7 +171,7 @@ test winSend-5.1 {ExecuteRemoteObject - no error} winSend {
}
}
list [send $interp {send [tk appname] {expr {2 / 1}}}]
-} {2}
+} 2
test winSend-5.2 {ExecuteRemoteObject - error} winSend {
set newInterps [winfo interps]
foreach interp $newInterps {
@@ -268,7 +268,7 @@ test winSend-6.8 {SendDDEServer - XTYP_WILDCONNECT} winSend {
}
set command "dde services Tk {}"
list [catch "send \{$interp\} \{$command\}"]
-} {0}
+} 0
test winSend-7.1 {DDEExitProc} winSend {
newApp testApp
@@ -312,10 +312,10 @@ test winSend-10.7 {Tk_DDEObjCmd - services wrong num args} winSend {
} {1 {wrong # args: should be "dde services serviceName topicName"}}
test winSend-10.8 {Tk_DDEObjCmd - null service name} winSend {
list [catch {dde services {} {tktest #2}}]
-} {0}
+} 0
test winSend-10.9 {Tk_DDEObjCmd - null topic name} winSend {
list [catch {dde services {Tk} {}}]
-} {0}
+} 0
test winSend-10.10 {Tk_DDEObjCmd - execute - nothing to execute} winSend {
set newInterps [winfo interps]
foreach interp $newInterps {
diff --git a/tests/wm.test b/tests/wm.test
index e9110bc..99ba84a 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -33,7 +33,9 @@ proc stdWindow {} {
#
proc raiseDelay {} {
- after 100; update
+ after 100;
+ update
+ update idletasks
}
# How to carry out a small delay while processing events
@@ -808,10 +810,10 @@ test wm-iconify-2.4.2 {Misc errors} -constraints !win -setup {
test wm-iconify-3.1 {iconify behavior} -body {
toplevel .t2
wm geom .t2 -0+0
- update
+ update idletasks
set result [winfo ismapped .t2]
wm iconify .t2
- update
+ update idletasks
lappend result [winfo ismapped .t2]
} -cleanup {
destroy .t2
@@ -1738,11 +1740,11 @@ test wm-transient-4.2 {already mapped transient toplevel
toplevel .master
raiseDelay
wm iconify .master
- update
+ update idletasks
toplevel .subject
- update
+ update idletasks
wm transient .subject .master
- update
+ update idletasks
list [wm state .subject] [winfo ismapped .subject]
} -cleanup {
deleteWindows
@@ -1753,13 +1755,13 @@ test wm-transient-4.3 {iconify/deiconify on the master
} -body {
toplevel .master
toplevel .subject
- update
+ update idletasks
wm transient .subject .master
wm iconify .master
- update
+ update idletasks
lappend results [wm state .subject] [winfo ismapped .subject]
wm deiconify .master
- update
+ update idletasks
lappend results [wm state .subject] [winfo ismapped .subject]
} -cleanup {
deleteWindows
@@ -2310,6 +2312,11 @@ test wm-forget-1.4 "pack into unmapped toplevel causes crash" -body {
test wm-forget-2 {bug [e9112ef96e] - [wm forget] doesn't completely} -setup {
catch {destroy .l .f.b .f}
set res {}
+ if {[tk windowingsystem] == "aqua"} {
+ proc doUpdate {} {update idletasks}
+ } else {
+ proc doUpdate {} {update}
+ }
} -body {
label .l -text "Top Dot"
frame .f
@@ -2317,16 +2324,15 @@ test wm-forget-2 {bug [e9112ef96e] - [wm forget] doesn't completely} -setup {
pack .l -side top
pack .f.b
pack .f -side bottom
- update
set res [winfo manager .f]
pack forget .f
- update
+ doUpdate
lappend res [winfo manager .f]
wm manage .f
- update
+ doUpdate
lappend res [winfo manager .f]
wm forget .f
- update
+ doUpdate
lappend res [winfo manager .f]
} -cleanup {
destroy .l .f.b .f