summaryrefslogtreecommitdiffstats
path: root/tests/winClipboard.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-04-12 18:51:11 (GMT)
committerhobbs <hobbs>2000-04-12 18:51:11 (GMT)
commit1c06a203ecbe741c83687742b659ab73514a0b00 (patch)
tree54b4b23879951a9bebe1b3feb46f3a2a684476b5 /tests/winClipboard.test
parentb78c23a7e207a18aa3049d06660f6ce12b2b0fbf (diff)
downloadtk-1c06a203ecbe741c83687742b659ab73514a0b00.zip
tk-1c06a203ecbe741c83687742b659ab73514a0b00.tar.gz
tk-1c06a203ecbe741c83687742b659ab73514a0b00.tar.bz2
* test/winClipboard.test:
* win/tkWinInt.h: * win/tkWinClipboard.c (UpdateClipboard): * win/tkWinX.c (GenerateXEvent): added updatingClipboard tsd and TkWinUpdatingClipboard accessor function to allow us to flag ourselves when we are the ones updating the clipboard. This corrected inability to create our own clipboard types within a Tk application. [Bug: 2338 4318] * win/tkWinTest.c (TestclipboardCmd): improved TestclipboardCmd with better error handling and obj'ification
Diffstat (limited to 'tests/winClipboard.test')
-rw-r--r--tests/winClipboard.test20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/winClipboard.test b/tests/winClipboard.test
index e693c6a..fca13eb 100644
--- a/tests/winClipboard.test
+++ b/tests/winClipboard.test
@@ -7,10 +7,10 @@
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 1997 by Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright (c) 1998-2000 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: winClipboard.test,v 1.6 1999/12/14 06:53:15 hobbs Exp $
+# RCS: @(#) $Id: winClipboard.test,v 1.7 2000/04/12 18:52:14 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -38,6 +38,7 @@ test winClipboard-1.2 {TkSelGetSelection} {pcOnly} {
test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {pcOnly} {
clipboard clear
clipboard append abcd
+ update
list [selection get -selection CLIPBOARD] [testclipboard]
} {abcd abcd}
test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} {pcOnly} {
@@ -51,6 +52,21 @@ test winClipboard-1.5 {TkSelGetSelection & TkWinClipboardRender} {pcOnly} {
list [selection get -selection CLIPBOARD] [testclipboard]
} [list "line 1\u00c7\nline 2" [bytestring "line 1\u00c7\r\nline 2"]]
+test winClipboard-2.1 {TkSelUpdateClipboard reentrancy problem} {pcOnly} {
+ clipboard clear
+ clipboard append -type OUR_ACTION "action data"
+ clipboard append "string data"
+ update
+ list [selection get -selection CLIPBOARD -type OUR_ACTION] [testclipboard]
+} [list "action data" "string data"]
+test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} {pcOnly} {
+ clipboard clear
+ clipboard append -type OUR_ACTION "new data"
+ clipboard append "more data in string"
+ update
+ list [testclipboard] [selection get -selection CLIPBOARD -type OUR_ACTION]
+} [list "more data in string" "new data"]
+
# cleanup
::tcltest::cleanupTests
return