diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/all | 9 | ||||
-rw-r--r-- | tests/defs | 6 | ||||
-rw-r--r-- | tests/safe.test | 13 |
3 files changed, 22 insertions, 6 deletions
@@ -2,7 +2,7 @@ # tests. Execute it by invoking "source all" when running tclTest # in this directory. # -# RCS: @(#) $Id: all,v 1.5 1999/03/24 18:07:46 hershey Exp $ +# RCS: @(#) $Id: all,v 1.6 1999/04/16 01:25:55 stanton Exp $ set TESTS_DIR [file join [pwd] [file dirname [info script]]] source [file join $TESTS_DIR defs] @@ -74,6 +74,11 @@ if {[info exists TMP_DIR]} { } # exit if Tk is running in non-interactive mode. -if {[info exists tk_version] && !$tcl_interactive} { +# Don't exit at the end of all the tests on the Mac, since +# this destroys the window that contains the test results... + +if {([info exists tk_version] && !$tcl_interactive) \ + || [string compare $tcl_platform(platform) macintosh]} { + catch {destroy .} exit } @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: defs,v 1.3 1998/12/04 04:19:12 hershey Exp $ +# RCS: @(#) $Id: defs,v 1.4 1999/04/16 01:25:55 stanton Exp $ if {![info exists VERBOSE]} { set VERBOSE 0 @@ -246,6 +246,10 @@ proc test {name description script answer args} { puts stdout "$answer" puts stdout "---- $name FAILED" } + if {[string compare $::tcl_platform(platform) macintosh] == 0} { + # Force the text to be drawn even if the tests are not updating. + update idletasks + } } proc dotests {file args} { diff --git a/tests/safe.test b/tests/safe.test index 90873f0..1a1970b 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -7,13 +7,14 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.3 1998/09/14 18:23:49 stanton Exp $ +# RCS: @(#) $Id: safe.test,v 1.4 1999/04/16 01:25:55 stanton Exp $ if {[info procs test] != "test"} { source defs } foreach i [winfo children .] { + puts "*** Destroying $i ***"; update idletasks destroy $i } @@ -26,6 +27,7 @@ if {"$tcl_platform(platform)" == "macintosh"} { } else { set hidden_cmds {bell cd clipboard exec exit fconfigure file glob grab load menu open pwd selection send socket source tk tk_chooseColor tk_getOpenFile tk_getSaveFile tk_messageBox toplevel wm} } +puts "About to do 1" test safe-1.1 {Safe Tk loading into an interpreter} { catch {safe::interpDelete a} @@ -97,7 +99,12 @@ test safe-3.2 {Unsafe commands are available hidden} { set status } ok -test safe-4.1 {testing loadTk} { +# This test gets a panic on the Mac in Tk8.0.5. It did not in 8.0.4, +# and it also does not if you update before deleting. This is just +# revealing the weakness in the link between the container list and the +# ports for the windows. The same comment applies to safe-5.2 + +test safe-4.1 {testing loadTk} {unixOrPc} { # no error shall occur, the user will # eventually see a new toplevel set i [safe::loadTk [safe::interpCreate]] @@ -126,7 +133,7 @@ test safe-5.1 {loading Tk in safe interps without master's clearance} { set msg } {not allowed to start Tk by master's safe::TkInit} -test safe-5.2 {multi-level Tk loading with clearance} { +test safe-5.2 {multi-level Tk loading with clearance} {unixOrPc} { # No error shall occur in that test and no window # shall remain at the end. set i [safe::interpCreate] |