1 # This file is a Tcl script to test out Tk's Windows specific
2 # clipboard code. It is organized in the standard fashion for Tcl
5 # This file contains a collection of tests for one or more of the Tcl
6 # built-in commands. Sourcing this file into Tcl runs the tests and
7 # generates output for errors. No output means no errors were found.
9 # Copyright (c) 1997 by Sun Microsystems, Inc.
11 # See the file "license.terms" for information on usage and redistribution
12 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
16 if {$tcl_platform(platform)!="windows"} {
20 if {[string compare test [info procs test]] == 1} {
24 # Note that these tests may fail if another application is grabbing the
25 # clipboard (e.g. an X server)
27 test winClipboard-1.1 {TkSelGetSelection} {
29 catch {selection get -selection CLIPBOARD} msg
31 } {CLIPBOARD selection doesn't exist or form "STRING" not defined}
32 test winClipboard-1.2 {TkSelGetSelection} {
35 list [selection get -selection CLIPBOARD] [testclipboard]
37 test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {
40 list [selection get -selection CLIPBOARD] [testclipboard]
42 test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} {
44 clipboard append "line 1\nline 2"
45 list [selection get -selection CLIPBOARD] [testclipboard]
46 } [list "line 1\nline 2" "line 1\r\nline 2"]