summaryrefslogtreecommitdiffstats
path: root/tests/winClipboard.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/winClipboard.test')
-rw-r--r--tests/winClipboard.test25
1 files changed, 9 insertions, 16 deletions
diff --git a/tests/winClipboard.test b/tests/winClipboard.test
index cc401c6..ec84362 100644
--- a/tests/winClipboard.test
+++ b/tests/winClipboard.test
@@ -11,32 +11,25 @@
# All rights reserved.
package require tcltest 2.1
-namespace import -force tcltest::configure
-namespace import -force tcltest::testsDirectory
-configure -testdir [file join [pwd] [file dirname [info script]]]
-configure -loadfile [file join [testsDirectory] constraints.tcl]
+eval tcltest::configure $argv
tcltest::loadTestedCommands
-namespace import -force tcltest::bytestring
-
# Note that these tests may fail if another application is grabbing the
# clipboard (e.g. an X server)
-testConstraint testclipboard [llength [info commands testclipboard]]
-
-test winClipboard-1.1 {TkSelGetSelection} {pcOnly} {
+test winClipboard-1.1 {TkSelGetSelection} win {
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} {pcOnly testclipboard} {
+test winClipboard-1.2 {TkSelGetSelection} {win testclipboard} {
clipboard clear
clipboard append {}
catch {selection get -selection CLIPBOARD} r1
catch {testclipboard} r2
list $r1 $r2
} {{} {}}
-test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {pcOnly testclipboard} {
+test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {win testclipboard} {
clipboard clear
clipboard append abcd
update
@@ -44,14 +37,14 @@ test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {pcOnly testcli
catch {testclipboard} r2
list $r1 $r2
} {abcd abcd}
-test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} {pcOnly testclipboard} {
+test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} {win testclipboard} {
clipboard clear
clipboard append "line 1\nline 2"
catch {selection get -selection CLIPBOARD} r1
catch {testclipboard} r2
list $r1 $r2
} [list "line 1\nline 2" "line 1\r\nline 2"]
-test winClipboard-1.5 {TkSelGetSelection & TkWinClipboardRender} {pcOnly testclipboard} {
+test winClipboard-1.5 {TkSelGetSelection & TkWinClipboardRender} {win testclipboard} {
clipboard clear
clipboard append "line 1\u00c7\nline 2"
catch {selection get -selection CLIPBOARD} r1
@@ -59,7 +52,7 @@ test winClipboard-1.5 {TkSelGetSelection & TkWinClipboardRender} {pcOnly testcli
list $r1 $r2
} [list "line 1\u00c7\nline 2" [bytestring "line 1\u00c7\r\nline 2"]]
-test winClipboard-2.1 {TkSelUpdateClipboard reentrancy problem} {pcOnly testclipboard} {
+test winClipboard-2.1 {TkSelUpdateClipboard reentrancy problem} {win testclipboard} {
clipboard clear
clipboard append -type OUR_ACTION "action data"
clipboard append "string data"
@@ -68,7 +61,7 @@ test winClipboard-2.1 {TkSelUpdateClipboard reentrancy problem} {pcOnly testclip
catch {testclipboard} r2
list $r1 $r2
} [list "action data" "string data"]
-test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} {pcOnly testclipboard} {
+test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} {win testclipboard} {
clipboard clear
clipboard append -type OUR_ACTION "new data"
clipboard append "more data in string"
@@ -79,5 +72,5 @@ test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} {pcOnly testclip
} [list "more data in string" "new data"]
# cleanup
-::tcltest::cleanupTests
+cleanupTests
return