summaryrefslogtreecommitdiffstats
path: root/tests/ioCmd.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r--tests/ioCmd.test43
1 files changed, 14 insertions, 29 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index c5b0352..cab4745 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -368,27 +368,6 @@ test iocmd-8.20 {fconfigure command / win console channel} -constraints {nonPort
} -returnCodes error -result [expectedOpts "-blah" {-inputmode}]
# TODO: Test parsing of serial channel options (nonPortable, since requires an
# open channel to work with).
-test iocmd-8.21 {fconfigure command / -nocomplainencoding 0 error} -constraints {
- deprecated obsolete
-} -setup {
- # I don't know how else to open the console, but this is non-portable
- set console stdin
-} -body {
- fconfigure $console -nocomplainencoding 0
-} -returnCodes error -result "bad value for -nocomplainencoding: only true allowed"
-test iocmd-8.22 {fconfigure command / -nocomplainencoding 0, no error if -strictencoding already defined} -setup {
- set console stdin
- set oldprofile [fconfigure $console -profile]
-} -constraints {
- obsolete
-} -body {
- fconfigure $console -strictencoding 1
- fconfigure $console -nocomplainencoding 0
- fconfigure $console -nocomplainencoding
-} -cleanup {
- fconfigure $console -strictencoding $oldmode
-} -result 0
-
test iocmd-8.23 {fconfigure -profile badprofile} -body {
fconfigure stdin -profile froboz
@@ -516,9 +495,15 @@ test iocmd-12.10 {POSIX open access modes: BINARY} {
close $f
set result
} 5
-test iocmd-12.11 {POSIX open access modes: BINARY} {
+test iocmd-12.11 {POSIX open access modes: BINARY} -body {
+ set f [open $path(test1) {WRONLY BINARY TRUNC}]
+ puts $f Ɉ ;# throws an exception
+} -cleanup {
+ close $f
+} -returnCodes 1 -match glob -result {error writing "*": invalid or incomplete multibyte or wide character}
+test iocmd-12.12 {POSIX open access modes: BINARY} {
set f [open $path(test1) {WRONLY BINARY TRUNC}]
- puts $f Ɉ ;# gets truncated to H
+ puts $f H
close $f
set f [open $path(test1) r]
fconfigure $f -translation binary
@@ -1387,7 +1372,7 @@ test iocmd-25.1 {chan configure, cgetall, standard options} -match glob -body {
close $c
rename foo {}
set res
-} -result {{-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {{} {}} -profile * -translation {auto *}}}
+} -result {{-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {} -profile * -translation {auto *}}}
test iocmd-25.2 {chan configure, cgetall, no options} -match glob -body {
set res {}
proc foo {args} {oninit cget cgetall; onfinal; track; return ""}
@@ -1396,7 +1381,7 @@ test iocmd-25.2 {chan configure, cgetall, no options} -match glob -body {
close $c
rename foo {}
set res
-} -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {{} {}} -profile * -translation {auto *}}}
+} -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {} -profile * -translation {auto *}}}
test iocmd-25.3 {chan configure, cgetall, regular result} -match glob -body {
set res {}
proc foo {args} {
@@ -1408,7 +1393,7 @@ test iocmd-25.3 {chan configure, cgetall, regular result} -match glob -body {
close $c
rename foo {}
set res
-} -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {{} {}} -profile * -translation {auto *} -bar foo -snarf x}}
+} -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {} -profile * -translation {auto *} -bar foo -snarf x}}
test iocmd-25.4 {chan configure, cgetall, bad result, list of uneven length} -match glob -body {
set res {}
proc foo {args} {
@@ -2929,7 +2914,7 @@ test iocmd.tf-25.1 {chan configure, cgetall, standard options} -match glob -body
rename foo {}
set res
} -constraints {testchannel thread} \
- -result {{-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {{} {}} * -translation {auto *}}}
+ -result {{-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {} * -translation {auto *}}}
test iocmd.tf-25.2 {chan configure, cgetall, no options} -match glob -body {
set res {}
proc foo {args} {oninit cget cgetall; onfinal; track; return ""}
@@ -2942,7 +2927,7 @@ test iocmd.tf-25.2 {chan configure, cgetall, no options} -match glob -body {
rename foo {}
set res
} -constraints {testchannel thread} \
- -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {{} {}} * -translation {auto *}}}
+ -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {} * -translation {auto *}}}
test iocmd.tf-25.3 {chan configure, cgetall, regular result} -match glob -body {
set res {}
proc foo {args} {
@@ -2958,7 +2943,7 @@ test iocmd.tf-25.3 {chan configure, cgetall, regular result} -match glob -body {
rename foo {}
set res
} -constraints {testchannel thread} \
- -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {{} {}} * -translation {auto *} -bar foo -snarf x}}
+ -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {} * -translation {auto *} -bar foo -snarf x}}
test iocmd.tf-25.4 {chan configure, cgetall, bad result, list of uneven length} -match glob -body {
set res {}
proc foo {args} {