# # mintest.test -- multiple interpreter tests # nca-073-9 # # Copyright (c) 1996-2000 by Netcetera AG. # Copyright (c) 2001 by Apache Software Foundation. # All rights reserved. # # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # @(#) $Id$ # # ----------------------------------------------------------------------------- # tcltest package # ----------------------------------------------------------------------------- if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import ::tcltest::* } # ----------------------------------------------------------------------------- # # ----------------------------------------------------------------------------- test mintest-1.1 {create an interpreter, load websh3 library} {} { set fna "mintest1_1a.tcl" set fh [open $fna "w"] puts $fh {catch {web::encrypt test} msg} puts $fh {set res $msg} puts $fh {load $env(WEB_LIBRARY)} puts $fh {catch {web::encrypt test} msg} puts $fh {lappend res $msg} puts $fh {puts $res} close $fh set fnb "mintest1_1b.tcl" set fh [open $fnb "w"] puts $fh return close $fh # find a late available tclsh, but preferrably the current version set ok 0 set v [info tclversion] regsub {\.} $v {} win foreach tclsh "$v $win 8.6 86 8.5 85 8.4 84 8.3 83 8.2 82 {}" { if {![catch {exec tclsh$tclsh < $fnb}]} { if {$tclsh != $v && $tclsh != $win} { puts stderr "Warning: Using tclsh$tclsh instead of tclsh[info tclversion]" } set ok 1 break } } set res "" if {$ok} { puts "Using tclsh$tclsh to test loading of $env(WEB_LIBRARY)" catch {set res [exec tclsh$tclsh $fna]} } else { error "No reasonable tclsh found" } file delete -force $fna file delete -force $fnb set res } {invalid command name web::encrypt XDq3pUAU8b} # cleanup ::tcltest::cleanupTests