OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tk/] [tests/] [winClipboard.test] - Rev 1782

Compare with Previous | Blame | View Log

# This file is a Tcl script to test out Tk's Windows specific
# clipboard code.  It is organized in the standard fashion for Tcl
# tests.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1997 by Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: winClipboard.test,v 1.1.1.1 2002-01-16 10:26:00 markom Exp $

if {$tcl_platform(platform)!="windows"} {
    return
}

if {[string compare test [info procs test]] == 1} {
    source defs
}

# Note that these tests may fail if another application is grabbing the
# clipboard (e.g. an X server)

test winClipboard-1.1 {TkSelGetSelection} {
    clipboard clear
    catch {selection get -selection CLIPBOARD} msg
    set msg
} {CLIPBOARD selection doesn't exist or form "STRING" not defined}
test winClipboard-1.2 {TkSelGetSelection} {
    clipboard clear
    clipboard append {}
    list [selection get -selection CLIPBOARD] [testclipboard]
} {{} {}}
test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} {
    clipboard clear
    clipboard append abcd
    list [selection get -selection CLIPBOARD] [testclipboard]
} {abcd abcd}
test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} {
    clipboard clear
    clipboard append "line 1\nline 2"
    list [selection get -selection CLIPBOARD] [testclipboard]
} [list "line 1\nline 2" "line 1\r\nline 2"]

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.