summaryrefslogtreecommitdiffstats
path: root/tests/bell.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/bell.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/bell.test')
-rw-r--r--tests/bell.test30
1 files changed, 24 insertions, 6 deletions
diff --git a/tests/bell.test b/tests/bell.test
index 935ce8f..228bd63 100644
--- a/tests/bell.test
+++ b/tests/bell.test
@@ -1,14 +1,29 @@
# This file is a Tcl script to test out Tk's "bell" command.
-# It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1998-2000 Scriptics Corporation.
# All rights reserved.
-package require tcltest 2.2
-namespace import ::tcltest::*
-eval 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
+
+#
+# TESTS
+#
test bell-1.1 {bell command} -body {
bell a
@@ -49,5 +64,8 @@ test bell-1.8 {bell command} -body {
bell
} -result {}
+#
+# TESTFILE CLEANUP
+#
+
cleanupTests
-return