summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--library/package.tcl4
-rw-r--r--tests/pkgMkIndex.test10
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a5f39c6..a6f921e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2003-07-24 Reinhard Max <max@suse.de>
+ * library/package.tcl: Fixed a typo that broke pkg_mkIndex -verbose.
+ * tests/pkgMkIndex.test: Added a test for [pkg_mkIndex -verbose].
+
* ChangeLog.2002 (new file):
* ChangeLog: broke changes from 2002 into ChangeLog.2002 to reduce
size of the main ChangeLog.
diff --git a/library/package.tcl b/library/package.tcl
index 9d1c235..545f6a9 100644
--- a/library/package.tcl
+++ b/library/package.tcl
@@ -3,7 +3,7 @@
# utility procs formerly in init.tcl which can be loaded on demand
# for package management.
#
-# RCS: @(#) $Id: package.tcl,v 1.24 2003/07/11 17:25:50 dgp Exp $
+# RCS: @(#) $Id: package.tcl,v 1.25 2003/07/24 08:45:18 rmax Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
@@ -368,7 +368,7 @@ proc pkg_mkIndex {args} {
set cmds [lsort [$c eval array names ::tcl::newCmds]]
set pkgs [$c eval set ::tcl::newPkgs]
if {$doVerbose} {
- if { !$::tcl::direct } {
+ if { !$direct } {
tclLog "commands provided were $cmds"
}
tclLog "packages provided were $pkgs"
diff --git a/tests/pkgMkIndex.test b/tests/pkgMkIndex.test
index 104ef8b..cf3509d 100644
--- a/tests/pkgMkIndex.test
+++ b/tests/pkgMkIndex.test
@@ -8,7 +8,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: pkgMkIndex.test,v 1.23 2002/07/06 18:19:46 dgp Exp $
+# RCS: @(#) $Id: pkgMkIndex.test,v 1.24 2003/07/24 08:45:09 rmax Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -285,6 +285,14 @@ test pkgMkIndex-2.3 {simple package - direct loading is default} {
pkgtest::runIndex $fullPkgPath simple.tcl
} "0 {{simple:1.0 {[list source [file join $fullPkgPath simple.tcl]]}}}"
+test pkgMkIndex-2.4 {simple package - use -verbose} -body {
+ pkgtest::runIndex -verbose $fullPkgPath simple.tcl
+} -result "0 {{simple:1.0 {[list source [file join $fullPkgPath simple.tcl]]}}}" \
+ -errorOutput {successful sourcing of simple.tcl
+packages provided were {simple 1.0}
+processed simple.tcl
+}
+
removeFile [file join pkg simple.tcl]
makeFile {