summaryrefslogtreecommitdiffstats
path: root/tests/winClipboard.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-09-21 20:38:18 (GMT)
committerhobbs <hobbs>2001-09-21 20:38:18 (GMT)
commita1c4d6114615a7794672fd0f929ad729f9163abe (patch)
treef44d701ac67421893fe5fa058674ea6c0e75c9ba /tests/winClipboard.test
parenta2f22702a6337c86083ff311cfc81a90c1bf6bb0 (diff)
downloadtk-a1c4d6114615a7794672fd0f929ad729f9163abe.zip
tk-a1c4d6114615a7794672fd0f929ad729f9163abe.tar.gz
tk-a1c4d6114615a7794672fd0f929ad729f9163abe.tar.bz2
improved use of test constraints
Diffstat (limited to 'tests/winClipboard.test')
-rw-r--r--tests/winClipboard.test34
1 files changed, 9 insertions, 25 deletions
diff --git a/tests/winClipboard.test b/tests/winClipboard.test
index 3c67bb7..73aaaef 100644
--- a/tests/winClipboard.test
+++ b/tests/winClipboard.test
@@ -10,7 +10,7 @@
# Copyright (c) 1998-2000 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: winClipboard.test,v 1.8 2001/04/04 07:07:45 hobbs Exp $
+# RCS: @(#) $Id: winClipboard.test,v 1.9 2001/09/21 20:38:18 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -19,25 +19,22 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
# Note that these tests may fail if another application is grabbing the
# clipboard (e.g. an X server)
-if {[llength [info command testclipboard]] == 0} {
- puts "\"testclipboard\" isn't defined, skipping winClipboard tests"
- ::tcltest::cleanupTests
- return
-}
+set ::tcltest::testConfig(testclipboard) \
+ [llength [info commands testclipboard]]
test winClipboard-1.1 {TkSelGetSelection} {pcOnly} {
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} {
+test winClipboard-1.2 {TkSelGetSelection} {pcOnly testclipboard} {
clipboard clear
clipboard append {}
catch {selection get -selection CLIPBOARD} r1
catch {testclipboard} r2
list $r1 $r2
} {{} {}}
-test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {pcOnly} {
+test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {pcOnly testclipboard} {
clipboard clear
clipboard append abcd
update
@@ -45,14 +42,14 @@ test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {pcOnly} {
catch {testclipboard} r2
list $r1 $r2
} {abcd abcd}
-test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} {pcOnly} {
+test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} {pcOnly 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} {
+test winClipboard-1.5 {TkSelGetSelection & TkWinClipboardRender} {pcOnly testclipboard} {
clipboard clear
clipboard append "line 1\u00c7\nline 2"
catch {selection get -selection CLIPBOARD} r1
@@ -60,7 +57,7 @@ test winClipboard-1.5 {TkSelGetSelection & TkWinClipboardRender} {pcOnly} {
list $r1 $r2
} [list "line 1\u00c7\nline 2" [bytestring "line 1\u00c7\r\nline 2"]]
-test winClipboard-2.1 {TkSelUpdateClipboard reentrancy problem} {pcOnly} {
+test winClipboard-2.1 {TkSelUpdateClipboard reentrancy problem} {pcOnly testclipboard} {
clipboard clear
clipboard append -type OUR_ACTION "action data"
clipboard append "string data"
@@ -69,7 +66,7 @@ test winClipboard-2.1 {TkSelUpdateClipboard reentrancy problem} {pcOnly} {
catch {testclipboard} r2
list $r1 $r2
} [list "action data" "string data"]
-test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} {pcOnly} {
+test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} {pcOnly testclipboard} {
clipboard clear
clipboard append -type OUR_ACTION "new data"
clipboard append "more data in string"
@@ -82,16 +79,3 @@ test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} {pcOnly} {
# cleanup
::tcltest::cleanupTests
return
-
-
-
-
-
-
-
-
-
-
-
-
-