summaryrefslogtreecommitdiffstats
path: root/tests/winClipboard.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/winClipboard.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/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