summaryrefslogtreecommitdiffstats
path: root/tests/winClipboard.test
diff options
context:
space:
mode:
authorrjohnson <rjohnson>1998-04-01 09:51:44 (GMT)
committerrjohnson <rjohnson>1998-04-01 09:51:44 (GMT)
commit066ea7fd88d49cb456f74da71dbe875e4fc0aabb (patch)
tree8fb30cb152c4dc191be47fa043d2e6f5ea38c7ba /tests/winClipboard.test
parent13242623d2ff3ea02ab6a62bfb48a7dbb5c27e22 (diff)
downloadtk-066ea7fd88d49cb456f74da71dbe875e4fc0aabb.zip
tk-066ea7fd88d49cb456f74da71dbe875e4fc0aabb.tar.gz
tk-066ea7fd88d49cb456f74da71dbe875e4fc0aabb.tar.bz2
Initial revision
Diffstat (limited to 'tests/winClipboard.test')
-rw-r--r--tests/winClipboard.test44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/winClipboard.test b/tests/winClipboard.test
new file mode 100644
index 0000000..222c23f
--- /dev/null
+++ b/tests/winClipboard.test
@@ -0,0 +1,44 @@
+# 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.
+#
+# Copyright (c) 1997 by Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# SCCS: @(#) winClipboard.test 1.3 97/07/01 18:10:37
+
+if {$tcl_platform(platform)!="windows"} {
+ return
+}
+
+if {[string compare test [info procs test]] == 1} {
+ source defs
+}
+
+test winClipboard-1.1 {TkSelGetSelection} {
+ clipboard clear
+ catch {selection get -selection CLIPBOARD} msg
+ set msg
+} {CLIPBOARD selection doesn't exist or form "STRING" not defined}
+test winClipboard-1.2 {TkSelGetSelection} {
+ clipboard clear
+ clipboard append {}
+ list [selection get -selection CLIPBOARD] [testclipboard]
+} {{} {}}
+test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {
+ clipboard clear
+ clipboard append abcd
+ list [selection get -selection CLIPBOARD] [testclipboard]
+} {abcd abcd}
+test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} {
+ clipboard clear
+ clipboard append "line 1\nline 2"
+ list [selection get -selection CLIPBOARD] [testclipboard]
+} [list "line 1\nline 2" "line 1\r\nline 2"]
+