URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [insight/] [tk/] [tests/] [winClipboard.test] - Blame information for rev 1765
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
578 |
markom |
# This file is a Tcl script to test out Tk's Windows specific
|
2 |
|
|
# clipboard code. It is organized in the standard fashion for Tcl
|
3 |
|
|
# tests.
|
4 |
|
|
#
|
5 |
|
|
# This file contains a collection of tests for one or more of the Tcl
|
6 |
|
|
# built-in commands. Sourcing this file into Tcl runs the tests and
|
7 |
|
|
# generates output for errors. No output means no errors were found.
|
8 |
|
|
#
|
9 |
|
|
# Copyright (c) 1997 by Sun Microsystems, Inc.
|
10 |
|
|
#
|
11 |
|
|
# See the file "license.terms" for information on usage and redistribution
|
12 |
|
|
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
13 |
|
|
#
|
14 |
|
|
# RCS: @(#) $Id: winClipboard.test,v 1.1.1.1 2002-01-16 10:26:00 markom Exp $
|
15 |
|
|
|
16 |
|
|
if {$tcl_platform(platform)!="windows"} {
|
17 |
|
|
return
|
18 |
|
|
}
|
19 |
|
|
|
20 |
|
|
if {[string compare test [info procs test]] == 1} {
|
21 |
|
|
source defs
|
22 |
|
|
}
|
23 |
|
|
|
24 |
|
|
# Note that these tests may fail if another application is grabbing the
|
25 |
|
|
# clipboard (e.g. an X server)
|
26 |
|
|
|
27 |
|
|
test winClipboard-1.1 {TkSelGetSelection} {
|
28 |
|
|
clipboard clear
|
29 |
|
|
catch {selection get -selection CLIPBOARD} msg
|
30 |
|
|
set msg
|
31 |
|
|
} {CLIPBOARD selection doesn't exist or form "STRING" not defined}
|
32 |
|
|
test winClipboard-1.2 {TkSelGetSelection} {
|
33 |
|
|
clipboard clear
|
34 |
|
|
clipboard append {}
|
35 |
|
|
list [selection get -selection CLIPBOARD] [testclipboard]
|
36 |
|
|
} {{} {}}
|
37 |
|
|
test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {
|
38 |
|
|
clipboard clear
|
39 |
|
|
clipboard append abcd
|
40 |
|
|
list [selection get -selection CLIPBOARD] [testclipboard]
|
41 |
|
|
} {abcd abcd}
|
42 |
|
|
test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} {
|
43 |
|
|
clipboard clear
|
44 |
|
|
clipboard append "line 1\nline 2"
|
45 |
|
|
list [selection get -selection CLIPBOARD] [testclipboard]
|
46 |
|
|
} [list "line 1\nline 2" "line 1\r\nline 2"]
|
47 |
|
|
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.