From f4ff4a223ba658dbf3fed7c42db2228b993699d1 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 25 May 2004 17:44:28 +0000 Subject: * tests/autoMkindex.test (autoMkindex-5.2): Use variable "result" that gets cleaned up. * tests/exec.test: Clean up the "path" array. * tests/interp.test (interp-9.3): Initialize res, so prior values cannot make the test fail. --- ChangeLog | 5 +++++ tests/autoMkindex.test | 8 ++++---- tests/exec.test | 5 +++-- tests/interp.test | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8de7e98..b708624 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-05-25 Don Porter + * tests/autoMkindex.test (autoMkindex-5.2): Use variable "result" + that gets cleaned up. + * tests/exec.test: Clean up the "path" array. + * tests/interp.test (interp-9.3): Initialize res, so prior values + cannot make the test fail. * tests/execute.test (execute-8.1): Updated to remove the trace set on ::errorInfo . When left in place, that trace can cause later tests to fail. diff --git a/tests/autoMkindex.test b/tests/autoMkindex.test index 457e225..56e1ffb 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.14 2002/10/03 13:34:32 dkf Exp $ +# RCS: @(#) $Id: autoMkindex.test,v 1.15 2004/05/25 17:44:29 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -326,15 +326,15 @@ proc {[magic mojo proc]} {} {} test autoMkindex-5.2 {correctly locate auto loaded procs with []} { file delete tclIndex - set res {} + set result {} 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]}}}] + set result [$c eval {catch {{[magic mojo proc]}}}] interp delete $c } - set res + set result } 0 removeFile [file join pkg magicchar2.tcl] diff --git a/tests/exec.test b/tests/exec.test index 8d338ca..40289aa 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: exec.test,v 1.19 2004/05/19 20:15:31 dkf Exp $ +# RCS: @(#) $Id: exec.test,v 1.20 2004/05/25 17:44:29 dgp Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -19,7 +19,7 @@ namespace import -force ::tcltest::* # All tests require the "exec" command. # Skip them if exec is not defined. testConstraint exec [llength [info commands exec]] -catch {unset path} +unset -nocomplain path set path(echo) [makeFile { puts -nonewline [lindex $argv 0] foreach str [lrange $argv 1 end] { @@ -601,6 +601,7 @@ test exec-18.1 { exec cat deals with weird file names} {exec tempNotWin} { foreach file {script gorp.file gorp.file2 echo cat wc sh sleep exit err} { removeFile $file } +unset -nocomplain path ::tcltest::cleanupTests return diff --git a/tests/interp.test b/tests/interp.test index 8298df1..3a91671 100644 --- a/tests/interp.test +++ b/tests/interp.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: interp.test,v 1.36 2004/05/20 13:04:12 dkf Exp $ +# RCS: @(#) $Id: interp.test,v 1.37 2004/05/25 17:44:30 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -295,6 +295,7 @@ test interp-9.3 {testing aliases for hidden commands} { catch {interp create a} a eval {proc p {} {return ENTER_A}} interp alias {} p a p + set res {} lappend res [list [catch p msg] $msg] interp hide a p lappend res [list [catch p msg] $msg] -- cgit v0.12