diff options
Diffstat (limited to 'tests/pkg.test')
-rw-r--r-- | tests/pkg.test | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/tests/pkg.test b/tests/pkg.test index d379eb8..02ffc14 100644 --- a/tests/pkg.test +++ b/tests/pkg.test @@ -5,23 +5,24 @@ # generates output for errors. No output means no errors were found. # # Copyright (c) 1995-1996 Sun Microsystems, Inc. +# Copyright (c) 1998-1999 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: pkg.test,v 1.3 1999/03/10 05:52:51 stanton Exp $ +# RCS: @(#) $Id: pkg.test,v 1.4 1999/04/16 00:47:32 stanton Exp $ -if {[string compare test [info procs test]] == 1} then {source defs} +if {[lsearch [namespace children] ::tcltest] == -1} { + source [file join [pwd] [file dirname [info script]] defs.tcl] +} # Do all this in a slave interp to avoid garbaging the # package list set i [interp create] -interp eval $i [list set VERBOSE $VERBOSE] -interp eval $i [list set TESTS $TESTS] +interp eval $i [list set argv $argv] +interp eval $i [list source [file join $::tcltest::testsDir defs.tcl]] interp eval $i { -if {[string compare test [info procs test]] == 1} then {source defs} - eval package forget [package names] set oldPkgUnknown [package unknown] package unknown {} @@ -483,7 +484,7 @@ test pkg-3.52 {Tcl_PackageCmd procedure, "vsatisfies" option} { } {0} test pkg-3.53 {Tcl_PackageCmd procedure, "versions" option} { list [catch {package foo} msg] $msg -} {1 {bad option "foo": should be forget, ifneeded, names, present, provide, require, unknown, vcompare, versions, or vsatisfies}} +} {1 {bad option "foo": must be forget, ifneeded, names, present, provide, require, unknown, vcompare, versions, or vsatisfies}} # No tests for FindPackage; can't think up anything detectable # errors. @@ -632,4 +633,20 @@ package unknown $oldPkgUnknown concat } + +# cleanup interp delete $i +::tcltest::cleanupTests +return + + + + + + + + + + + + |