summaryrefslogtreecommitdiffstats
path: root/tests/border.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/border.test')
-rw-r--r--tests/border.test31
1 files changed, 24 insertions, 7 deletions
diff --git a/tests/border.test b/tests/border.test
index 96ebdcf..b144d90 100644
--- a/tests/border.test
+++ b/tests/border.test
@@ -1,14 +1,30 @@
# This file is a Tcl script to test out the procedures in the file
-# tkBorder.c. It is organized in the standard fashion for Tcl tests.
+# tkBorder.c.
#
# Copyright © 1998 Sun Microsystems, Inc.
# Copyright © 1998-1999 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 border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints {
testborder
@@ -196,7 +212,8 @@ test border-4.7 {Tk_GetReliefFromObj - error} -body {
destroy .b
} -returnCodes error -result {bad relief "upanddown": must be flat, groove, raised, ridge, solid, or sunken}
+#
+# TESTFILE CLEANUP
+#
-# cleanup
cleanupTests
-return