summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-11-03 22:02:11 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-11-03 22:02:11 (GMT)
commit829daa099115e8cba17ba6e5453ee67fa299f6de (patch)
tree735d94505a177b5be538aa4a75a91d01b1687d4a /tests
parent493b92ef205df6d05b0b5c478934f4f49ca261c9 (diff)
downloadtk-829daa099115e8cba17ba6e5453ee67fa299f6de.zip
tk-829daa099115e8cba17ba6e5453ee67fa299f6de.tar.gz
tk-829daa099115e8cba17ba6e5453ee67fa299f6de.tar.bz2
Fixed broken test. testclipboard no longer returns binary data but proper tcl strings without \r
Diffstat (limited to 'tests')
-rw-r--r--tests/winClipboard.test28
1 files changed, 23 insertions, 5 deletions
diff --git a/tests/winClipboard.test b/tests/winClipboard.test
index 90810f3..b5594b8 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.16 2008/10/28 17:44:38 dgp Exp $
+# RCS: @(#) $Id: winClipboard.test,v 1.17 2008/11/03 22:02:12 patthoyts Exp $
package require tcltest 2.2
eval tcltest::configure $argv
@@ -56,23 +56,38 @@ test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} -constraints {
} -setup {
clipboard clear
} -body {
+ set map [list "\r" "\\r" "\n" "\\n"]
clipboard append "line 1\nline 2"
- list [selection get -selection CLIPBOARD] [testclipboard]
+ list [string map $map [selection get -selection CLIPBOARD]]\
+ [string map $map [testclipboard]]
} -cleanup {
clipboard clear
-} -result [list "line 1\nline 2" "line 1\r\nline 2"]
+} -result [list "line 1\\nline 2" "line 1\\nline 2"]
test winClipboard-1.5 {TkSelGetSelection & TkWinClipboardRender} -constraints {
win testclipboard
} -setup {
clipboard clear
} -body {
+ set map [list "\r" "\\r" "\n" "\\n"]
clipboard append "line 1\u00c7\nline 2"
- list [selection get -selection CLIPBOARD] [testclipboard]
+ list [string map $map [selection get -selection CLIPBOARD]]\
+ [string map $map [testclipboard]]
} -cleanup {
clipboard clear
-} -result [list "line 1\u00c7\nline 2" "line 1\u00c7\r\nline 2"]
+} -result [list "line 1\u00c7\\nline 2" "line 1\u00c7\\nline 2"]
+test winClipboard-1.6 {TkSelGetSelection & TkWinClipboardRender} -constraints {
+ win testclipboard
+} -setup {
+ clipboard clear
+} -body {
+ clipboard append "\u043f\u0440\u0438\u0432\u0435\u0442 \u043c\u0438\u0444"
+ list [selection get -selection CLIPBOARD] [testclipboard]
+} -cleanup {
+ clipboard clear
+} -result [list "\u043f\u0440\u0438\u0432\u0435\u0442 \u043c\u0438\u0444"\
+ "\u043f\u0440\u0438\u0432\u0435\u0442 \u043c\u0438\u0444"]
test winClipboard-2.1 {TkSelUpdateClipboard reentrancy problem} -constraints {
win testclipboard
@@ -104,3 +119,6 @@ test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} -constraints {
cleanupTests
return
+# Local variables:
+# mode: tcl
+# End: \ No newline at end of file