summaryrefslogtreecommitdiffstats
path: root/tests/winClipboard.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/winClipboard.test')
-rw-r--r--tests/winClipboard.test46
1 files changed, 30 insertions, 16 deletions
diff --git a/tests/winClipboard.test b/tests/winClipboard.test
index cb286f0..284ee90 100644
--- a/tests/winClipboard.test
+++ b/tests/winClipboard.test
@@ -1,24 +1,36 @@
# This file is a Tcl script to test out Tk's Windows specific
-# clipboard code. It is organized in the standard fashion for Tcl
-# tests.
-#
-# This file contains a collection of tests for one or more of the Tcl
-# built-in commands. Sourcing this file into Tcl runs the tests and
-# generates output for errors. No output means no errors were found.
+# clipboard code.
#
# Copyright © 1997 Sun Microsystems, Inc.
# Copyright © 1998-2000 Scriptics Corporation.
# All rights reserved.
-package require tcltest 2.2
-eval tcltest::configure $argv
-tcltest::loadTestedCommands
-namespace import -force tcltest::test
+# NOTE
+#
+# Some of these tests may fail if another application is grabbing the clipboard
+# (e.g. an X server, or a VNC viewer) #
+
+#
+# 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]
-#################################################################
-# Note that some of these tests may fail if another application #
-# is grabbing the clipboard (e.g. an X server, or a VNC viewer) #
-#################################################################
+
+# Ensure a pristine initial window state
+resetWindows
+
+#
+# TESTS
+#
test winClipboard-1.1 {TkSelGetSelection} -constraints win -setup {
clipboard clear
@@ -114,9 +126,11 @@ test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} -constraints {
clipboard clear
} -result {{more data in string} {new data}}
-# cleanup
+#
+# TESTFILE CLEANUP
+#
+
cleanupTests
-return
# Local variables:
# mode: tcl