summaryrefslogtreecommitdiffstats
path: root/tests/cmds.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2025-10-31 19:28:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2025-10-31 19:28:42 (GMT)
commitc25f14940d3c7823cae0a783f34c6f147518a1b3 (patch)
treed598543193e4ffbb2336840441fd696a854ab6cc /tests/cmds.test
parent3d21e16ae679d4c1ae0b73441536c7429a72657d (diff)
parent2f48a0563a693aeccaf7550989d0539a3c940d95 (diff)
downloadtk-core-tk-print-fixes.zip
tk-core-tk-print-fixes.tar.gz
tk-core-tk-print-fixes.tar.bz2
Diffstat (limited to 'tests/cmds.test')
-rw-r--r--tests/cmds.test35
1 files changed, 27 insertions, 8 deletions
diff --git a/tests/cmds.test b/tests/cmds.test
index 8a1ff2a..1fcf047 100644
--- a/tests/cmds.test
+++ b/tests/cmds.test
@@ -1,17 +1,36 @@
# This file is a Tcl script to test the procedures in the file
-# tkCmds.c. It is organized in the standard fashion for Tcl tests.
+# tkCmds.c.
#
# Copyright © 1996 Sun Microsystems, Inc.
# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
-package require tcltest 2.2
-eval tcltest::configure $argv
-tcltest::loadTestedCommands
-namespace import -force tcltest::test
+#
+# 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
+
+#
+# COMMON TEST SETUP
+#
update
+#
+# TESTS
+#
+
test cmds-1.1 {tkwait visibility, argument errors} -body {
tkwait visibility
} -returnCodes error -result {wrong # args: should be "tkwait variable|visibility|window name"}
@@ -53,8 +72,8 @@ test cmds-1.6 {tkwait visibility, window gets deleted} -setup {
destroy .f
} -result {deleted}
+#
+# TESTFILE CLEANUP
+#
-# cleanup
cleanupTests
-return
-