summaryrefslogtreecommitdiffstats
path: root/tests/chanio.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-07 14:48:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-07 14:48:49 (GMT)
commitde59a00a303f0acfad8f990f62e5095d0e327298 (patch)
treefaafe148a3e9a9aa2979d879f684cb56546b6aec /tests/chanio.test
parent7eea8518801d1e4164af76b1ac7f76e0336de4fe (diff)
downloadtcl-de59a00a303f0acfad8f990f62e5095d0e327298.zip
tcl-de59a00a303f0acfad8f990f62e5095d0e327298.tar.gz
tcl-de59a00a303f0acfad8f990f62e5095d0e327298.tar.bz2
Use "0o" in stead of "0" as octal prefix in more places.
Diffstat (limited to 'tests/chanio.test')
-rw-r--r--tests/chanio.test8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/chanio.test b/tests/chanio.test
index 8e27af9..2d900d0 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -5338,22 +5338,22 @@ 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 "0%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]
lappend x [chan gets $f]
} -cleanup {
chan close $f
-} -result {0600 {line 1}}
+} -result {0o600 {line 1}}
test chan-io-40.3 {POSIX open access modes: CREAT} -setup {
file delete $path(test3)
} -constraints {unix umask} -body {
# 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 "0%o" [expr $stats(mode)&0o777]
-} -result [format %04o [expr {0o666 & ~ $umaskValue}]]
+ 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)
} -body {