diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/env.test | 4 | ||||
-rw-r--r-- | tests/http.test | 30 | ||||
-rw-r--r-- | tests/parse.test | 6 | ||||
-rw-r--r-- | tests/unixInit.test | 6 |
4 files changed, 26 insertions, 20 deletions
diff --git a/tests/env.test b/tests/env.test index 27656e4..6030ce1 100644 --- a/tests/env.test +++ b/tests/env.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: env.test,v 1.4 1999/04/16 00:47:26 stanton Exp $ +# RCS: @(#) $Id: env.test,v 1.4.4.1 1999/04/26 21:14:56 rjohnson Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -173,7 +173,7 @@ test env-4.5 {unsetting international environment variables} {execCommandExists} test env-5.0 {corner cases - set a value, it should exist} {} { set temp [lindex [array names env] end] - set x env($temp) + set x $env($temp) set env($temp) a set result [set env($temp)] set env($temp) $x diff --git a/tests/http.test b/tests/http.test index 752e3a2..0868259 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,7 +12,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.4 1999/04/16 00:47:28 stanton Exp $ +# RCS: @(#) $Id: http.test,v 1.4.4.1 1999/04/22 23:04:37 welch Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -36,7 +36,16 @@ if {[catch {package require http 2.0}]} { set port 8010 set bindata "This is binary data\x0d\x0amore\x0dmore\x0amore\x00null" -set httpdFile [file join $::tcltest::testsDir httpd] +# Ensure httpd file exists + +set origFile [file join $::tcltest::testsDir httpd] +set newFile [file join $::tcltest::workingDir httpd] +if {![file exists $newFile]} { + file copy $origFile $newFile + set removeHttpd 1 +} +set httpdFile [file join $::tcltest::workingDir httpd] + if {[info commands testthread] == "testthread" && [file exists $httpdFile]} { set httpthread [testthread create " source $httpdFile @@ -299,17 +308,10 @@ if {[info exists httpthread]} { } else { close $listen } -::tcltest::cleanupTests -return - - - - - - - - - - +if {[info exist removeHttpd]} { + remove $httpdFile +} +::tcltest::cleanupTests +return diff --git a/tests/parse.test b/tests/parse.test index 1f36063..ebdc5a4 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.3 1999/04/16 00:47:31 stanton Exp $ +# RCS: @(#) $Id: parse.test,v 1.3.4.1 1999/04/29 23:19:06 stanton Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -723,6 +723,10 @@ test parse-15.56 {CommandComplete procedure} { test parse-15.57 {CommandComplete procedure} { info complete "# Comment should be complete command" } 1 +test parse-15.58 {CommandComplete procedure, memory leaks} { + info complete "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22" +} 1 + # cleanup catch {unset a} diff --git a/tests/unixInit.test b/tests/unixInit.test index 7ed56b7..30b8c28 100644 --- a/tests/unixInit.test +++ b/tests/unixInit.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: unixInit.test,v 1.4 1999/04/21 21:50:31 rjohnson Exp $ +# RCS: @(#) $Id: unixInit.test,v 1.4.2.1 1999/04/24 01:08:23 rjohnson Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -90,7 +90,7 @@ test unixInit-2.1 {TclpInitLibraryPath: value of installLib, developLib} \ set x {} lappend x [string compare [lindex $path 0] $prefix/$installLib] - lappend x [string compare [lindex $path 1] [file dirname $prefix]/$developLib] + lappend x [string compare [lindex $path 4] [file dirname $prefix]/$developLib] set x } {0 0} test unixInit-2.2 {TclpInitLibraryPath: TCL_LIBRARY} {unixOnly installedTcl} { @@ -139,7 +139,7 @@ test unixInit-2.6 {TclpInitLibraryPath: executable relative} \ set x [lrange [getlibpath /tmp/sparkly/bin/tcltest] 0 1] file delete -force /tmp/sparkly set x -} [list /tmp/sparkly/lib/tcl[info tclversion] /tmp/tcl[info tclversion]/library] +} [list /tmp/sparkly/lib/tcl[info tclversion] /tmp/lib/tcl[info tclversion]] test unixInit-2.7 {TclpInitLibraryPath: compiled-in library path} \ {emptyTest unixOnly} { # would need test command to get defaultLibDir and compare it to |