diff options
author | stanton <stanton> | 1999-04-16 01:51:06 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-04-16 01:51:06 (GMT) |
commit | 03656f44f81469f459031fa3a4a7b09c8bc77712 (patch) | |
tree | 31378e81bd58f8c726fc552d6b30cbf3ca07497b /tests/send.test | |
parent | 404fc236f34304df53b7e44bc7971d786b87d453 (diff) | |
download | tk-03656f44f81469f459031fa3a4a7b09c8bc77712.zip tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.gz tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.bz2 |
* Merged 8.1 branch into the main trunk
Diffstat (limited to 'tests/send.test')
-rw-r--r-- | tests/send.test | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/tests/send.test b/tests/send.test index 2f6e7d1..816151e 100644 --- a/tests/send.test +++ b/tests/send.test @@ -4,28 +4,31 @@ # # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1994-1996 Sun Microsystems, Inc. +# Copyright (c) 1998-1999 by Scriptics Corporation. +# All rights reserved. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# RCS: @(#) $Id: send.test,v 1.2 1998/09/14 18:23:50 stanton Exp $ +# RCS: @(#) $Id: send.test,v 1.3 1999/04/16 01:51:40 stanton Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + source [file join [pwd] [file dirname [info script]] defs.tcl] +} if {$tcl_platform(platform) == "macintosh"} { puts "send is not available on the Mac - skipping tests" + ::tcltest::cleanupTests return } if {$tcl_platform(platform) == "window"} { puts "send is not available under Windows - skipping tests" + ::tcltest::cleanupTests return } if {[auto_execok xhost] == ""} { puts "xhost application isn't available - skipping tests" + ::tcltest::cleanupTests return } -if {[info procs test] != "test"} { - source defs -} if {[info commands testsend] == "testsend"} { set gotTestCmds 1 } else { @@ -48,6 +51,7 @@ if {[catch {send $app set a 0} msg] == 1} { puts -nonewline "Your X server is insecure, so \"send\" can't be used;" puts " skipping \"send\" tests." cleanupbg + ::tcltest::cleanupTests return } } @@ -325,6 +329,8 @@ if $gotTestCmds { while executing "open bogus_file_name" invoked from within +"if 1 {open bogus_file_name}" + invoked from within "send t_s_1 {if 1 {open bogus_file_name}}"} {POSIX ENOENT {no such file or directory}}} test send-8.16 {Tk_SendCmd procedure, bogusCommWindow} { testsend prop root InterpRegistry "10234 bogus\n" @@ -546,7 +552,7 @@ r setupbg dobg {tk appname t_s_3} set x [list [catch {send t_s_3 exit} msg] $msg] - close $fd + close $::tcltest::fd set x } {1 {target application died}} @@ -577,15 +583,15 @@ test send-12.2 {TimeoutProc procedure} { tk appname tktest update setupbg - puts $fd {after 10 {after 5000; exit}; puts [tk appname]; puts **DONE**; flush stdout} - set bgDone 0 - set bgData {} - flush $fd - tkwait variable bgDone - set app $bgData + puts $::tcltest::fd {after 10 {after 5000; exit}; puts [tk appname]; puts **DONE**; flush stdout} + set ::tcltest::bgDone 0 + set ::tcltest::bgData {} + flush $::tcltest::fd + tkwait variable ::tcltest::bgDone + set app $::tcltest::bgData after 200 set result [list [catch {send $app foo} msg] $msg] - close $fd + close $::tcltest::fd set result } {1 {target application died}} @@ -654,3 +660,20 @@ if $gotTestCmds { testdeleteapps } rename newApp {} + +# cleanup +::tcltest::cleanupTests +return + + + + + + + + + + + + + |