summaryrefslogtreecommitdiffstats
path: root/tests/winPipe.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-01-01 15:14:42 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-01-01 15:14:42 (GMT)
commita6cdf257c61c62aa64357851af8f6e376b7f8881 (patch)
tree06031b0878fe01f3aa9ec4610a723046d9c4fe24 /tests/winPipe.test
parent52a3d5af143656324d78483b244f92addfbe6176 (diff)
downloadtcl-a6cdf257c61c62aa64357851af8f6e376b7f8881.zip
tcl-a6cdf257c61c62aa64357851af8f6e376b7f8881.tar.gz
tcl-a6cdf257c61c62aa64357851af8f6e376b7f8881.tar.bz2
Clean up of tests and conversion to tcltest 2. Target has been to get init and
cleanup code out of the test body and into the -setup/-cleanup stanzas.
Diffstat (limited to 'tests/winPipe.test')
-rw-r--r--tests/winPipe.test19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/winPipe.test b/tests/winPipe.test
index 1700fa2..632f8e7 100644
--- a/tests/winPipe.test
+++ b/tests/winPipe.test
@@ -9,16 +9,15 @@
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# See the file "license.terms" for information on usage and redistribution of
+# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: winPipe.test,v 1.34 2010/10/06 20:21:39 dgp Exp $
+# RCS: @(#) $Id: winPipe.test,v 1.35 2011/01/01 15:14:43 dkf Exp $
package require tcltest
namespace import -force ::tcltest::*
unset -nocomplain path
-
set bindir [file join [pwd] [file dirname [info nameofexecutable]]]
set cat32 [file join $bindir cat32.exe]
@@ -60,7 +59,7 @@ set path(more) [makeFile {
set path(stdout) [makeFile {} stdout]
set path(stderr) [makeFile {} stderr]
-
+
test winpipe-1.1 {32 bit comprehensive tests: from little file} {win exec cat32} {
exec $cat32 < $path(little) > $path(stdout) 2> $path(stderr)
list [contents $path(stdout)] [contents $path(stderr)]
@@ -185,7 +184,6 @@ test winpipe-4.1 {Tcl_WaitPid} {win nt exec cat32} {
set result "$result$line"
}
}
-
set f [open "|[list $cat32] < $path(big) 2> $path(stderr)" r]
fconfigure $f -buffering none -blocking 0
fileevent $f readable "readResults $f"
@@ -237,7 +235,7 @@ test winpipe-5.1 {TclpCreateTempFile: cleanup temp files} {win exec} {
set existing [glob -nocomplain c:/tcl*.tmp]
exec [interpreter] < $path(nothing)
foreach p [glob -nocomplain c:/tcl*.tmp] {
- if {[lsearch $existing $p] == -1} {
+ if {$p ni $existing} {
lappend x $p
}
}
@@ -312,7 +310,6 @@ set path(echoArgs.tcl) [makeFile {
puts "[list $argv0 $argv]"
} echoArgs.tcl]
-
### validate the raw output of BuildCommandLine().
###
test winpipe-7.1 {BuildCommandLine: null arguments} {win exec} {
@@ -429,7 +426,7 @@ test winpipe-8.18 {BuildCommandLine/parse_cmdline pass-thru: special chars #2} {
test winpipe-8.19 {ensure parse_cmdline isn't doing wildcard replacement} {win exec} {
exec [interpreter] $path(echoArgs.tcl) foo * makefile.?c bar
} [list $path(echoArgs.tcl) [list foo * makefile.?c bar]]
-
+
# restore old values for env(TMP) and env(TEMP)
if {[catch {set env(TMP) $env_tmp}]} {
@@ -449,3 +446,7 @@ removeFile nothing
removeFile echoArgs.tcl
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: