summaryrefslogtreecommitdiffstats
path: root/tests/clipboard.test
diff options
context:
space:
mode:
authorericm <ericm>2000-08-01 18:52:44 (GMT)
committerericm <ericm>2000-08-01 18:52:44 (GMT)
commit8f8cdccd5ae74a53f74f32b1c0b68ef6a201fcb4 (patch)
tree3471ab8e79e55e871c50d71388c67f6f464335b9 /tests/clipboard.test
parent8635c0d7f9be9de36520f329efdcd09c3c61d47e (diff)
downloadtk-8f8cdccd5ae74a53f74f32b1c0b68ef6a201fcb4.zip
tk-8f8cdccd5ae74a53f74f32b1c0b68ef6a201fcb4.tar.gz
tk-8f8cdccd5ae74a53f74f32b1c0b68ef6a201fcb4.tar.bz2
* generic/tkInt.h: Removed prototype for Tk_ClipboardCmd, added
prototype for Tk_ClipboardObjCmd. * generic/tkWindow.c: Updated function pointers for clipboard command to use Tcl_Obj version. * tests/clipboard.test: Updated tests to expect standard error messages. * generic/tkClipboard.c (Tk_ClipboardObjCmd): Obj'ified Tk_ClipboardCmd -> Tk_ClipboardObjCmd.
Diffstat (limited to 'tests/clipboard.test')
-rw-r--r--tests/clipboard.test23
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/clipboard.test b/tests/clipboard.test
index 93e3633..02c3fa2 100644
--- a/tests/clipboard.test
+++ b/tests/clipboard.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: clipboard.test,v 1.4 2000/05/14 23:25:04 ericm Exp $
+# RCS: @(#) $Id: clipboard.test,v 1.5 2000/08/01 18:52:45 ericm Exp $
#
# Note: Multiple display clipboard handling will only be tested if the
@@ -196,7 +196,7 @@ test clipboard-7.3 {Tk_ClipboardCmd procedure} {
} {0 {} information}
test clipboard-7.4 {Tk_ClipboardCmd procedure} {
list [catch {clipboard append --x a b} msg] $msg
-} {1 {unknown option "--x"}}
+} {1 {bad option "--x": must be -displayof, -format, or -type}}
test clipboard-7.5 {Tk_ClipboardCmd procedure} {
list [catch {clipboard append -- a b} msg] $msg
} {1 {wrong # args: should be "clipboard append ?options? data"}}
@@ -207,7 +207,7 @@ test clipboard-7.6 {Tk_ClipboardCmd procedure} {
} {0 {} -format}
test clipboard-7.7 {Tk_ClipboardCmd procedure} {
list [catch {clipboard append -displayofoo f} msg] $msg
-} {1 {unknown option "-displayofoo"}}
+} {1 {bad option "-displayofoo": must be -displayof, -format, or -type}}
test clipboard-7.8 {Tk_ClipboardCmd procedure} {
list [catch {clipboard append -type TEST} msg] $msg
} {1 {wrong # args: should be "clipboard append ?options? data"}}
@@ -217,13 +217,13 @@ test clipboard-7.9 {Tk_ClipboardCmd procedure} {
test clipboard-7.10 {Tk_ClipboardCmd procedure} {
list [catch {clipboard clear -displayof} msg] $msg
-} {1 {value for "-displayof" missing}}
+} {1 {wrong # args: should be "clipboard clear ?-displayof window?"}}
test clipboard-7.11 {Tk_ClipboardCmd procedure} {
list [catch {clipboard clear -displayofoo f} msg] $msg
-} {1 {unknown option "-displayofoo"}}
+} {1 {bad option "-displayofoo": must be -displayof}}
test clipboard-7.12 {Tk_ClipboardCmd procedure} {
list [catch {clipboard clear foo} msg] $msg
-} {1 {wrong # args: should be "clipboard clear ?options?"}}
+} {1 {wrong # args: should be "clipboard clear ?-displayof window?"}}
test clipboard-7.13 {Tk_ClipboardCmd procedure} {
list [catch {clipboard clear -displayof foo} msg] $msg
} {1 {bad window path name "foo"}}
@@ -232,6 +232,17 @@ test clipboard-7.14 {Tk_ClipboardCmd procedure} {
list [catch {clipboard error} msg] $msg
} {1 {bad option "error": must be append, clear, or get}}
+test clipboard-7.15 {Tk_ClipboardCmd procedure} {
+ clipboard clear
+ list [catch {clipboard append -displayof} msg] $msg \
+ [selection get -selection CLIPBOARD]
+} {0 {} -displayof}
+test clipboard-7.16 {Tk_ClipboardCmd procedure} {
+ clipboard clear
+ list [catch {clipboard append -type} msg] $msg \
+ [selection get -selection CLIPBOARD]
+} {0 {} -type}
+
# cleanup
::tcltest::cleanupTests
return