Posted to tcl by jdc at Fri Oct 19 14:49:11 GMT 2007view raw
- proc ptest { path } {
- puts "testing in $path"
- global auto_path
- set f [open $path/pkgIndex.tcl w]
- puts $f {package ifneeded testPkg 1.0 [list source [file join $dir testPkg.tcl]]}
- close $f
- set f [open $path/testPkg.tcl w]
- puts $f {package provide testPkg 1.0}
- close $f
- lappend auto_path $path
- catch {package require testPkg} msg
- puts $msg
- }
- ptest x:/tmp
- ptest c:/tmp