diff options
author | Ian Roxborough <irox@redhat.com> | 2001-09-10 00:22:29 +0000 |
---|---|---|
committer | Ian Roxborough <irox@redhat.com> | 2001-09-10 00:22:29 +0000 |
commit | ee7709783c85577eba6af30cd711e17e403befed (patch) | |
tree | 74233a880ee1f7e13c7ded61d093318e8c6e7d5c /tk/tests/canvImg.test | |
parent | a850c17c374d03259483e799b09326d255e17487 (diff) | |
download | gdb-TK_8_3.tar.gz |
Tk 8.3 upgradeTK_8_3
Diffstat (limited to 'tk/tests/canvImg.test')
-rw-r--r-- | tk/tests/canvImg.test | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/tk/tests/canvImg.test b/tk/tests/canvImg.test index f10115e9333..0424d8a3348 100644 --- a/tk/tests/canvImg.test +++ b/tk/tests/canvImg.test @@ -4,23 +4,23 @@ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# Copyright (c) 1998-1999 by Scriptics Corporation. +# All rights reserved. # # RCS: @(#) $Id$ +if {[lsearch [namespace children] ::tcltest] == -1} { + source [file join [pwd] [file dirname [info script]] defs.tcl] +} + if {[lsearch [image types] test] < 0} { puts "This application hasn't been compiled with the \"test\" image" puts "type, so I can't run this test. Are you sure you're using" puts "tktest instead of wish?" + ::tcltest::cleanupTests return } -if {[info procs test] != "test"} { - source defs -} - foreach i [winfo children .] { destroy $i } @@ -60,7 +60,7 @@ test canvImg-1.5 {options for image items} { test canvImg-2.1 {CreateImage procedure} { list [catch {.c create image 40} msg] $msg -} {1 {wrong # args: should be ".c create image x y ?options?"}} +} {1 {wrong # coordinates: expected 2, got 1}} test canvImg-2.2 {CreateImage procedure} { list [catch {.c create image 40 50 60} msg] $msg } {1 {unknown option "60"}} @@ -100,7 +100,7 @@ test canvImg-3.4 {ImageCoords procedure} { .c delete all .c create image 50 100 -image foo -tags i1 list [catch {.c coords i1 250} msg] $msg -} {1 {wrong # coordinates: expected 0 or 2, got 1}} +} {1 {wrong # coordinates: expected 2, got 1}} test canvImg-3.5 {ImageCoords procedure} { .c delete all .c create image 50 100 -image foo -tags i1 @@ -395,3 +395,20 @@ test canvImg-11.3 {ImageChangedProc procedure} { update set y } {{foo2 display 0 0 20 40 50 40}} + +# cleanup +::tcltest::cleanupTests +return + + + + + + + + + + + + + |