diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2025-10-31 19:28:42 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2025-10-31 19:28:42 (GMT) |
| commit | c25f14940d3c7823cae0a783f34c6f147518a1b3 (patch) | |
| tree | d598543193e4ffbb2336840441fd696a854ab6cc /tests/winMsgbox.test | |
| parent | 3d21e16ae679d4c1ae0b73441536c7429a72657d (diff) | |
| parent | 2f48a0563a693aeccaf7550989d0539a3c940d95 (diff) | |
| download | tk-core-tk-print-fixes.zip tk-core-tk-print-fixes.tar.gz tk-core-tk-print-fixes.tar.bz2 | |
Merge trunkcore-tk-print-fixes
Diffstat (limited to 'tests/winMsgbox.test')
| -rw-r--r-- | tests/winMsgbox.test | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/tests/winMsgbox.test b/tests/winMsgbox.test index ab5698c..dd72bfa 100644 --- a/tests/winMsgbox.test +++ b/tests/winMsgbox.test @@ -2,13 +2,33 @@ # # Copyright © 2007 Pat Thoyts <patthoyts@users.sourceforge.net> -package require tcltest 2.2 -namespace import ::tcltest::* -tcltest::configure {*}$argv -tcltest::loadTestedCommands +# +# TESTFILE INITIALIZATION +# + +package require tcltest 2.2; # needed in mode -singleproc 0 + +# Load the main script main.tcl, which takes care of: +# - setup for the application and the root window +# - importing commands from the tcltest namespace +# - loading of the testutils mechanism along with its utility procs +# - loading of Tk specific test constraints (additionally to constraints +# provided by the package tcltest) +source [file join [tcltest::configure -testdir] main.tcl] + +# Ensure a pristine initial window state +resetWindows + +# +# LOCAL TEST CONSTRAINTS +# testConstraint getwindowinfo [expr {[llength [info command ::testgetwindowinfo]] > 0}] +# +# COMMON TEST SETUP +# + if {[testConstraint testwinevent]} { catch {testwinevent debug 1} } @@ -33,7 +53,9 @@ proc GetWindowInfo {title button} { testwinevent $hwnd $button WM_COMMAND } -# ------------------------------------------------------------------------- +# +# TESTS +# test winMsgbox-1.1 {tk_messageBox ok} -constraints {win getwindowinfo} -setup { wm iconify . @@ -178,7 +200,6 @@ test winMsgbox-1.13 {tk_messageBox yesnocancel} -constraints {win getwindowinfo} wm deiconify . } -result {cancel} -# ------------------------------------------------------------------------- test winMsgbox-2.1 {tk_messageBox message} -constraints {win getwindowinfo} -setup { wm iconify . @@ -245,7 +266,6 @@ test winMsgbox-2.4 {tk_messageBox message (empty)} -constraints { wm deiconify . } -result [list ok ""] -# ------------------------------------------------------------------------- test winMsgbox-3.1 {tk_messageBox detail (sourceforge bug #1692927)} -constraints { win getwindowinfo @@ -282,13 +302,14 @@ test winMsgbox-3.2 {tk_messageBox detail (unicode)} -constraints { wm deiconify . } -result [list ok "Поиск\n\nстраниц"] -# ------------------------------------------------------------------------- +# +# TESTFILE CLEANUP +# if {[testConstraint testwinevent]} { catch {testwinevent debug 0} } cleanupTests -return # Local variables: # mode: tcl |
