summaryrefslogtreecommitdiffstats
path: root/tests/chanio.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-30 13:37:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-30 13:37:42 (GMT)
commit8f3e8012b1ad2c0f87eeba801b88e438b85143af (patch)
tree129f62422f2c348f41663d1c15a1deb2a47f4610 /tests/chanio.test
parentcfe53b8870af9dc22186aadfaec26380ae433716 (diff)
parent076a7e2839881c03d0a98a8fc50823aef42ad79a (diff)
downloadtcl-8f3e8012b1ad2c0f87eeba801b88e438b85143af.zip
tcl-8f3e8012b1ad2c0f87eeba801b88e438b85143af.tar.gz
tcl-8f3e8012b1ad2c0f87eeba801b88e438b85143af.tar.bz2
Merge 8.6
Diffstat (limited to 'tests/chanio.test')
-rw-r--r--tests/chanio.test20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/chanio.test b/tests/chanio.test
index daacdd0..858db7f 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -3050,7 +3050,7 @@ test chan-io-30.13 {Tcl_Write crlf on block boundary, Tcl_Read auto} -setup {
string length [chan read $f]
} -cleanup {
chan close $f
-} -result [expr 700*15+1]
+} -result [expr {700*15 + 1}]
test chan-io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} -setup {
file delete $path(test1)
} -body {
@@ -3067,7 +3067,7 @@ test chan-io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} -setup {
string length [chan read $f]
} -cleanup {
chan close $f
-} -result [expr 700*15+1]
+} -result [expr {700*15 + 1}]
test chan-io-30.15 {Tcl_Write mixed, Tcl_Read auto} -setup {
file delete $path(test1)
} -body {
@@ -3909,7 +3909,7 @@ test chan-io-31.31 {Tcl_Write crlf on block boundary, Tcl_Gets crlf} -setup {
}
chan close $f
string length $c
-} -result [expr 700*15+1]
+} -result [expr {700*15 + 1}]
test chan-io-31.32 {Tcl_Write crlf on block boundary, Tcl_Gets auto} -setup {
file delete $path(test1)
set c ""
@@ -3929,7 +3929,7 @@ test chan-io-31.32 {Tcl_Write crlf on block boundary, Tcl_Gets auto} -setup {
}
chan close $f
string length $c
-} -result [expr 700*15+1]
+} -result [expr {700*15 + 1}]
# Test Tcl_Read and buffering.
@@ -5340,7 +5340,7 @@ test chan-io-40.2 {POSIX open access modes: CREAT} -setup {
} -constraints {unix} -body {
set f [open $path(test3) {WRONLY CREAT} 0600]
file stat $path(test3) stats
- set x [format "%#o" [expr $stats(mode)&0o777]]
+ set x [format "%#o" [expr {$stats(mode) & 0o777}]]
chan puts $f "line 1"
chan close $f
set f [open $path(test3) r]
@@ -5354,7 +5354,7 @@ test chan-io-40.3 {POSIX open access modes: CREAT} -setup {
# This test only works if your umask is 2, like ouster's.
chan close [open $path(test3) {WRONLY CREAT}]
file stat $path(test3) stats
- format "%#o" [expr $stats(mode)&0o777]
+ format "%#o" [expr {$stats(mode) & 0o777}]
} -result [format %#5o [expr {0o666 & ~ $umaskValue}]]
test chan-io-40.4 {POSIX open access modes: CREAT} -setup {
file delete $path(test3)
@@ -6721,7 +6721,7 @@ test chan-io-52.6 {TclCopyChannel} -setup {
set f2 [open $path(test1) w]
chan configure $f1 -translation lf -blocking 0
chan configure $f2 -translation lf -blocking 0
- set s0 [chan copy $f1 $f2 -size [expr [file size $thisScript] + 5]]
+ set s0 [chan copy $f1 $f2 -size [expr {[file size $thisScript] + 5}]]
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
chan close $f1
chan close $f2
@@ -6963,7 +6963,7 @@ test chan-io-53.5 {CopyData: error during chan copy} {socket fcopy} {
chan close $listen ;# This means the socket open never really succeeds
chan copy $in $out -command [namespace code FcopyTestDone]
variable fcopyTestDone
- if ![info exists fcopyTestDone] {
+ if {![info exists fcopyTestDone]} {
vwait [namespace which -variable fcopyTestDone] ;# The error occurs here in the b.g.
}
chan close $in
@@ -6983,7 +6983,7 @@ test chan-io-53.6 {CopyData: error during chan copy} -setup {
set out [open $path(test1) w]
chan copy $in $out -command [namespace code FcopyTestDone]
variable fcopyTestDone
- if ![info exists fcopyTestDone] {
+ if {![info exists fcopyTestDone]} {
vwait [namespace which -variable fcopyTestDone]
}
return $fcopyTestDone ;# 0 for plain end of file
@@ -7036,7 +7036,7 @@ test chan-io-53.7 {CopyData: Flooding chan copy from pipe} -setup {
vwait [namespace which -variable fcopyTestDone]
}
# -1=error 0=script error N=number of bytes
- expr ($fcopyTestDone == 0) ? $fcopyTestCount : -1
+ expr {($fcopyTestDone == 0) ? $fcopyTestCount : -1}
} -cleanup {
catch {chan close $in}
chan close $out