summaryrefslogtreecommitdiffstats
path: root/tests/clipboard.test
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>2000-08-01 18:52:44 (GMT)
committerericm <ericm@noemail.net>2000-08-01 18:52:44 (GMT)
commit962e0de901d3e4df94662d54de76b22b5768b481 (patch)
tree3471ab8e79e55e871c50d71388c67f6f464335b9 /tests/clipboard.test
parentb0f441107c79a4ff112c23f1453a4a6cac146d8e (diff)
downloadtk-962e0de901d3e4df94662d54de76b22b5768b481.zip
tk-962e0de901d3e4df94662d54de76b22b5768b481.tar.gz
tk-962e0de901d3e4df94662d54de76b22b5768b481.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. FossilOrigin-Name: a6f47654b0becb7295f30e18367f43e2c2290f4b
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