summaryrefslogtreecommitdiffstats
path: root/tests/cluster.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cluster.test')
-rw-r--r--tests/cluster.test33
1 files changed, 27 insertions, 6 deletions
diff --git a/tests/cluster.test b/tests/cluster.test
index 1ef9424..f535791 100644
--- a/tests/cluster.test
+++ b/tests/cluster.test
@@ -1,18 +1,36 @@
# This file is a Tcl script to test the [::tk::startOf|endOf]* functions in
-# tk.tcl and tkIcu.c. It is organized in the standard fashion for Tcl tests.
+# tk.tcl and tkIcu.c.
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1995 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
+
+#
+# LOCAL TEST CONSTRAINTS
+#
testConstraint needsICU [expr {[catch {info body ::tk::startOfCluster}]}]
+#
+# TESTS
+#
test cluster-1.0 {::tk::startOfCluster} -body {
::tk::startOfCluster é -1
@@ -242,5 +260,8 @@ test cluster-8.6 {::tk::wordBreakAfter} -body {
::tk::wordBreakAfter a b c d
} -returnCodes 1 -result {wrong # args: should be "::tk::wordBreakAfter str start ?locale?"}
+#
+# TESTFILE CLEANUP
+#
+
cleanupTests
-return