diff options
author | ericm <ericm@noemail.net> | 2000-01-29 00:12:45 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-01-29 00:12:45 (GMT) |
commit | 69c2a0f5e5d27a57c0d94893373f6f59b9ee3b65 (patch) | |
tree | ee6d1327507899d558998df83d6f9523690a6c56 /tests | |
parent | ed8caa8ee956e1c2657c03f8fc7df93992d981aa (diff) | |
download | tcl-69c2a0f5e5d27a57c0d94893373f6f59b9ee3b65.zip tcl-69c2a0f5e5d27a57c0d94893373f6f59b9ee3b65.tar.gz tcl-69c2a0f5e5d27a57c0d94893373f6f59b9ee3b65.tar.bz2 |
* tests/pkg/magicchar2.tcl:
* tests/autoMkindex.test: Test for auto loader fix (bug #2480).
* library/init.tcl: auto_load was using [info commands $name] to
determine if a given command was available; if the command name
had * or [] it, this would fail because info commands uses
glob-style matching. This is fixed. (Bug #2480).
FossilOrigin-Name: 56990efadd02959eb3cf9659c55872101d0fb25b
Diffstat (limited to 'tests')
-rw-r--r-- | tests/autoMkindex.test | 14 | ||||
-rw-r--r-- | tests/pkg/magicchar2.tcl | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/autoMkindex.test b/tests/autoMkindex.test index bab9e43..c033bf0 100644 --- a/tests/autoMkindex.test +++ b/tests/autoMkindex.test @@ -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: autoMkindex.test,v 1.9 2000/01/28 16:38:34 ericm Exp $ +# RCS: @(#) $Id: autoMkindex.test,v 1.10 2000/01/29 00:12:46 ericm Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -198,6 +198,18 @@ test autoMkindex-5.1 {escape magic tcl chars in general code} { } set result } {set auto_index(testProc) [list source [file join $dir pkg magicchar.tcl]]} +test autoMkindex-5.2 {correctly locate auto loaded procs with []} { + file delete tclIndex + set res {} + if { ![catch {auto_mkindex . pkg/magicchar2.tcl}] } { + # Make a slave interp to test the autoloading + set c [interp create] + $c eval {lappend auto_path [pwd]} + set res [$c eval {catch {{[magic mojo proc]}}}] + interp delete $c + } + set res +} 0 # Clean up. diff --git a/tests/pkg/magicchar2.tcl b/tests/pkg/magicchar2.tcl new file mode 100644 index 0000000..2e7b47f --- /dev/null +++ b/tests/pkg/magicchar2.tcl @@ -0,0 +1 @@ +proc {[magic mojo proc]} {} {} |