summaryrefslogtreecommitdiffstats
path: root/tests/pkg.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-09-24 01:14:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-09-24 01:14:38 (GMT)
commitd1fefb7ec79f96d245eb6d5c88159ca70251ccd2 (patch)
tree1df679b5cc067e181ce58de48df471961b5d2fec /tests/pkg.test
parent910d08025cdac3f37d7cf798cee2b634f6ebd711 (diff)
downloadtcl-d1fefb7ec79f96d245eb6d5c88159ca70251ccd2.zip
tcl-d1fefb7ec79f96d245eb6d5c88159ca70251ccd2.tar.gz
tcl-d1fefb7ec79f96d245eb6d5c88159ca70251ccd2.tar.bz2
* generic/tclBasic.c: Corrections to the 2004-09-21 commit
* generic/tclExecute.c: regarding ERR_ALREADY_LOGGED. That commit * generic/tclNamesp.c: caused Tk test send-10.7 to fail. Added * tests/namespace.test (25.7,8): tests in the Tcl test suite * tests/pkg.test (2.25,26): to catch this error without the aid of Tk in the future.
Diffstat (limited to 'tests/pkg.test')
-rw-r--r--tests/pkg.test21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/pkg.test b/tests/pkg.test
index 97235f9..7f3a9b5 100644
--- a/tests/pkg.test
+++ b/tests/pkg.test
@@ -10,7 +10,7 @@
# 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.12 2004/05/19 12:56:01 dkf Exp $
+# RCS: @(#) $Id: pkg.test,v 1.13 2004/09/24 01:14:47 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -261,6 +261,25 @@ test pkg-2.24 {Tcl_PkgRequire procedure, version checks} {
package provide t 2.3
list [catch {package require -exact t 2.2} msg] $msg
} {1 {version conflict for package "t": have 2.3, need 2.2}}
+test pkg-2.25 {Tcl_PkgRequire procedure, error in ifneeded script} {
+ package forget t
+ package ifneeded t 2.1 {package provide t 2.1; error "ifneeded test" EI}
+ list [catch {package require t 2.1} msg] $msg $errorInfo
+} {1 {ifneeded test} {EI
+ ("package ifneeded" script)
+ invoked from within
+"package require t 2.1"}}
+test pkg-2.26 {Tcl_PkgRequire procedure, error in ifneeded script} {
+ package forget t
+ package ifneeded t 2.1 {package provide t 2.1; foreach x 1 {error "ifneeded test" EI}}
+ list [catch {package require t 2.1} msg] $msg $errorInfo
+} {1 {ifneeded test} {EI
+ ("foreach" body line 1)
+ invoked from within
+"foreach x 1 {error "ifneeded test" EI}"
+ ("package ifneeded" script)
+ invoked from within
+"package require t 2.1"}}
test pkg-3.1 {Tcl_PackageCmd procedure} {
list [catch {package} msg] $msg