summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-14 09:05:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-14 09:05:01 (GMT)
commit73eb386816168576a6c42eea64be0b214e6d7d6c (patch)
tree632320ff8144756f72cf3850bede8c0170fc5c5c /tests/io.test
parentbc97ae8a02bb8363f85b25501b9aa125c5b344cd (diff)
downloadtcl-73eb386816168576a6c42eea64be0b214e6d7d6c.zip
tcl-73eb386816168576a6c42eea64be0b214e6d7d6c.tar.gz
tcl-73eb386816168576a6c42eea64be0b214e6d7d6c.tar.bz2
Don't use "0%o" format in test-cases, as it suggest's it's the normal way to format octal numbers: it isn't. Better use "%#o".
Add tests for "format" and "scan" corner-cases which weren't documented (except in TIP's) neither had tests before.
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/io.test b/tests/io.test
index e2a05dc..7d8c80f 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -5652,8 +5652,8 @@ test io-40.3 {POSIX open access modes: CREAT} {unix umask} {
set f [open $path(test3) {WRONLY CREAT}]
close $f
file stat $path(test3) stats
- format "0%o" [expr $stats(mode)&0o777]
-} [format %04o [expr {0o666 & ~ $umaskValue}]]
+ format "%#o" [expr $stats(mode)&0o777]
+} [format %#5o [expr {0o666 & ~ $umaskValue}]]
test io-40.4 {POSIX open access modes: CREAT} {
file delete $path(test3)
set f [open $path(test3) w]