diff options
Diffstat (limited to 'tests/safe.test')
-rw-r--r-- | tests/safe.test | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/safe.test b/tests/safe.test index 10c8b29..3e9f716 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -7,10 +7,7 @@ # All rights reserved. package require tcltest 2.1 -namespace import -force tcltest::configure -namespace import -force tcltest::testsDirectory -configure -testdir [file join [pwd] [file dirname [info script]]] -configure -loadfile [file join [testsDirectory] constraints.tcl] +eval tcltest::configure $argv tcltest::loadTestedCommands ## NOTE: Any time tests fail here with an error like: @@ -35,16 +32,14 @@ tcltest::loadTestedCommands # The set of hidden commands is platform dependent: -if {"$tcl_platform(platform)" == "macintosh"} { - set hidden_cmds {beep bell cd clipboard echo encoding exit fconfigure file glob grab load ls menu open pwd selection send socket source tk_chooseColor tk_chooseDirectory tk_getOpenFile tk_getSaveFile toplevel wm} -} elseif {"$tcl_platform(platform)" == "windows"} { - set hidden_cmds {bell cd clipboard encoding exec exit fconfigure file glob grab load menu open pwd selection socket source tk_chooseColor tk_chooseDirectory tk_getOpenFile tk_getSaveFile tk_messageBox toplevel wm} +if {[string equal $tcl_platform(platform) "windows"]} { + set hidden_cmds {bell cd clipboard encoding exec exit fconfigure file glob grab load menu open pwd selection socket source tk_chooseColor tk_chooseDirectory tk_getOpenFile tk_getSaveFile tk_messageBox toplevel unload wm} } else { - set hidden_cmds {bell cd clipboard encoding exec exit fconfigure file glob grab load menu open pwd selection send socket source toplevel wm} + set hidden_cmds {bell cd clipboard encoding exec exit fconfigure file glob grab load menu open pwd selection send socket source toplevel unload wm} } set saveAutoPath $::auto_path -set ::auto_path [list [info library] $::tk_library] +set auto_path [list [info library] $::tk_library] test safe-1.1 {Safe Tk loading into an interpreter} { catch {safe::interpDelete a} @@ -217,5 +212,5 @@ test safe-7.1 {canvas printing} { # cleanup set ::auto_path $saveAutoPath unset hidden_cmds -::tcltest::cleanupTests +cleanupTests return |