From d1b091eb4fb7d440ca4281ab468189ce04b508a6 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 25 Feb 2003 22:03:23 +0000 Subject: * tests/pid.test: See below [Bug #678412]. * tests/io.test: Made more robust against spaces in paths [Bug #678400]. --- ChangeLog | 8 ++++++-- tests/io.test | 16 ++++++++-------- tests/pid.test | 4 ++-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index f11f0f5..3ef59d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,12 @@ +2003-02-25 Andreas Kupries + + * tests/pid.test: See below [Bug #678412]. + * tests/io.test: Made more robust against spaces in paths [Bug #678400]. + 2003-02-25 Miguel Sofer * tests/execute.test: cleaning up testobj's at the end, to avoid - leak warning by valgrind. - + leak warning by valgrind. 2003-02-22 Zoran Vasiljevic diff --git a/tests/io.test b/tests/io.test index 0130dc0..d74fa9d 100644 --- a/tests/io.test +++ b/tests/io.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.39 2003/02/09 02:50:25 hobbs Exp $ +# RCS: @(#) $Id: io.test,v 1.40 2003/02/25 22:03:38 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -53,7 +53,7 @@ close $f set path(cat) [makeFile { set f stdin if {$argv != ""} { - set f [open $argv] + set f [open [lindex $argv 0]] } fconfigure $f -encoding binary -translation lf -blocking 0 -eofchar \x1a fconfigure stdout -encoding binary -translation lf -buffering none @@ -2628,15 +2628,15 @@ test io-29.32 {Tcl_WriteChars, background flush to slow reader} \ catch {removeFile pipe} catch {removeFile output} set f [open $path(pipe) w] - puts $f [format {set f [open "%s" w]} $path(output)] + puts $f [format {set f [open {%s} w]} $path(output)] puts $f {fconfigure $f -translation lf} set x [list while {![eof stdin]}] - set x "$x {" + set x "$x \{" puts $f $x puts $f { after 20} puts $f { puts -nonewline $f [read stdin 1024]} puts $f { flush $f} - puts $f "}" + puts $f "\}" puts $f {close $f} close $f set x 01234567890123456789012345678901 @@ -5748,7 +5748,7 @@ test io-48.3 {testing readability conditions} {stdio unixOnly nonBlockFiles} { } close $f set f [open "|[list [interpreter]]" r+] - fileevent $f readable [namespace code [list consume $f]] + fileevent $f readable [namespace code [list consume $f]] fconfigure $f -buffering line fconfigure $f -blocking off proc consume {f} { @@ -5765,8 +5765,8 @@ test io-48.3 {testing readability conditions} {stdio unixOnly nonBlockFiles} { } set l "" variable x not_done - puts $f [format {source %s} $path(my_script)] - puts $f [format {set f [open %s r]} $path(bar)] + puts $f [format {source {%s}} $path(my_script)] + puts $f [format {set f [open {%s} r]} $path(bar)] puts $f {copy_slowly $f} puts $f {exit} vwait [namespace which -variable x] diff --git a/tests/pid.test b/tests/pid.test index 8d89235..0bc3d24 100644 --- a/tests/pid.test +++ b/tests/pid.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: pid.test,v 1.7 2002/07/04 20:06:13 andreas_kupries Exp $ +# RCS: @(#) $Id: pid.test,v 1.8 2003/02/25 22:03:45 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -33,7 +33,7 @@ test pid-1.1 {pid command} { regexp {(^[0-9]+$)|(^0x[0-9a-fA-F]+$)} [pid] } 1 test pid-1.2 {pid command} {unixOrPc unixExecs} { - set f [open [format {| echo foo | cat >%s} $path(test1)] w] + set f [open [format {| echo foo | cat {>%s}} $path(test1)] w] set pids [pid $f] close $f catch {removeFile test1} -- cgit v0.12