diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-29 06:48:16 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-29 06:48:16 (GMT) |
commit | 287ae817d18f64049ec3b37a0d233fec9117ed94 (patch) | |
tree | 47fbd13ac904578046c04c42bf1299d4453bfb03 /tests | |
parent | 5702dc4a124c62207657dbb7418d9598d7b67c74 (diff) | |
parent | feb4cedf2bc123276a2997508048e4862ba70ce4 (diff) | |
download | tk-287ae817d18f64049ec3b37a0d233fec9117ed94.zip tk-287ae817d18f64049ec3b37a0d233fec9117ed94.tar.gz tk-287ae817d18f64049ec3b37a0d233fec9117ed94.tar.bz2 |
Merge 8.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/event.test | 5 | ||||
-rw-r--r-- | tests/textTag.test | 2 | ||||
-rw-r--r-- | tests/window.test | 33 |
3 files changed, 38 insertions, 2 deletions
diff --git a/tests/event.test b/tests/event.test index 4b485c1..03405dd 100644 --- a/tests/event.test +++ b/tests/event.test @@ -828,9 +828,10 @@ test event-9 {no <Enter> event is generated for the container window when its pack propagate .top 0 bind .top <Enter> {lappend res %W} pack [frame .top.f -bg green -width 50 -height 50] -anchor se -side bottom - update + tkwait visibility .top.f event generate .top.f <Motion> -warp 1 -x 25 -y 25 ; # <Enter> sent to .top and .top.f - after 50 ; update + after 50 ; # Win specific - wait for SendInput to be executed + update ; # idletasks not enough destroy .top.f ; # no <Enter> event sent update set res diff --git a/tests/textTag.test b/tests/textTag.test index e60920c..b703a81 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1353,6 +1353,8 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints { .t configure -font $textWidgetFont -wrap none } -body { .t tag configure big -font $bigFont + # update needed here to stabilize the test + update event gen .t <ButtonRelease-1> -state 0x100 -x $x4 -y $y4 event gen .t <Motion> -x $x5 -y $y5 set x [.t index current] diff --git a/tests/window.test b/tests/window.test index dec2cc4..8a56d5a 100644 --- a/tests/window.test +++ b/tests/window.test @@ -263,6 +263,38 @@ test window-2.11 {Tk_DestroyWindow, don't reanimate a half-dead window} -constra list $error $msg } -result {0 YES} +test window-2.12 {Test for ticket [9b6065d1fd] - restore Tcl [update] command} -constraints { + unixOrWin +} -body { + set code [loadTkCommand] + append code { + after 1000 {set forever 1} + after 100 {destroy .} + after 200 {catch bell msg; puts "ringing the bell -> $msg"} + after 250 {update idletasks} + after 300 {update} + puts "waiting" + vwait forever + puts "done waiting" + catch {bell} msg + puts "bell -> $msg" + catch update msg + puts "update -> $msg" + } + set script [makeFile $code script] + if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { + set error 1 + } else { + set error 0 + } + removeFile script + list $error $msg +} -result {0 {waiting +ringing the bell -> can't invoke "bell" command: application has been destroyed +done waiting +bell -> can't invoke "bell" command: application has been destroyed +update -> }} + test window-3.1 {Tk_MakeWindowExist procedure, stacking order and menubars} -constraints { unix testmenubar @@ -342,6 +374,7 @@ test window-5.1 {Tk_MakeWindowExist procedure, stacking order and menubars} -con } -result {} + # cleanup cleanupTests return |