summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/chan.test2
-rw-r--r--tests/chanio.test22
-rw-r--r--tests/io.test26
-rw-r--r--tests/ioCmd.test6
4 files changed, 28 insertions, 28 deletions
diff --git a/tests/chan.test b/tests/chan.test
index 4155c36..280783f 100644
--- a/tests/chan.test
+++ b/tests/chan.test
@@ -61,7 +61,7 @@ test chan-4.5 {chan command: check valid inValue, invalid outValue} -body {
} -returnCodes error -match glob -result {bad value for -eofchar:*}
test chan-4.6 {chan command: check no inValue, valid outValue} -body {
chan configure stdout -eofchar [list {} \x27]
-} -result {} -cleanup {chan configure stdout -eofchar [list {} {}]}
+} -returnCodes error -result {bad value for -eofchar: must be non-NUL ASCII character} -cleanup {chan configure stdout -eofchar [list {} {}]}
test chan-5.1 {chan command: copy subcommand} -body {
chan copy foo
diff --git a/tests/chanio.test b/tests/chanio.test
index c1085f4..f9d272a 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -1895,7 +1895,7 @@ test chan-io-20.3 {Tcl_CreateChannel: initial settings} -constraints {unix} -bod
list [chan configure $f -eofchar] [chan configure $f -translation]
} -cleanup {
chan close $f
-} -result {{{} {}} {auto lf}}
+} -result {{{}} {auto lf}}
test chan-io-20.5 {Tcl_CreateChannel: install channel in empty slot} -setup {
set path(stdout) [makeFile {} stdout]
} -constraints {stdio notWinCI} -body {
@@ -4657,7 +4657,7 @@ test chan-io-35.6 {Tcl_Eof, eof char, lf write, auto read} -setup {
list $s [string length [chan read $f]] [chan eof $f]
} -cleanup {
chan close $f
-} -result {9 8 1}
+} -result {8 8 1}
test chan-io-35.7 {Tcl_Eof, eof char, lf write, lf read} -setup {
file delete $path(test1)
} -body {
@@ -4671,7 +4671,7 @@ test chan-io-35.7 {Tcl_Eof, eof char, lf write, lf read} -setup {
list $s [string length [chan read $f]] [chan eof $f]
} -cleanup {
chan close $f
-} -result {9 8 1}
+} -result {8 8 1}
test chan-io-35.8 {Tcl_Eof, eof char, cr write, auto read} -setup {
file delete $path(test1)
} -body {
@@ -4685,7 +4685,7 @@ test chan-io-35.8 {Tcl_Eof, eof char, cr write, auto read} -setup {
list $s [string length [chan read $f]] [chan eof $f]
} -cleanup {
chan close $f
-} -result {9 8 1}
+} -result {8 8 1}
test chan-io-35.9 {Tcl_Eof, eof char, cr write, cr read} -setup {
file delete $path(test1)
} -body {
@@ -4699,7 +4699,7 @@ test chan-io-35.9 {Tcl_Eof, eof char, cr write, cr read} -setup {
list $s [string length [chan read $f]] [chan eof $f]
} -cleanup {
chan close $f
-} -result {9 8 1}
+} -result {8 8 1}
test chan-io-35.10 {Tcl_Eof, eof char, crlf write, auto read} -setup {
file delete $path(test1)
} -body {
@@ -4713,7 +4713,7 @@ test chan-io-35.10 {Tcl_Eof, eof char, crlf write, auto read} -setup {
list $s [string length [chan read $f]] [chan eof $f]
} -cleanup {
chan close $f
-} -result {11 8 1}
+} -result {10 8 1}
test chan-io-35.11 {Tcl_Eof, eof char, crlf write, crlf read} -setup {
file delete $path(test1)
} -body {
@@ -4727,7 +4727,7 @@ test chan-io-35.11 {Tcl_Eof, eof char, crlf write, crlf read} -setup {
list $s [string length [chan read $f]] [chan eof $f]
} -cleanup {
chan close $f
-} -result {11 8 1}
+} -result {10 8 1}
test chan-io-35.12 {Tcl_Eof, eof char in middle, lf write, auto read} -setup {
file delete $path(test1)
} -body {
@@ -5288,26 +5288,26 @@ test chan-io-39.22 {Tcl_SetChannelOption, invariance} -setup {
} -constraints {unix} -body {
set f1 [open $path(test1) w+]
lappend l [chan configure $f1 -eofchar]
- chan configure $f1 -eofchar {ON GO}
+ chan configure $f1 -eofchar {ON {}}
lappend l [chan configure $f1 -eofchar]
chan configure $f1 -eofchar D
lappend l [chan configure $f1 -eofchar]
} -cleanup {
chan close $f1
-} -result {{{} {}} {O G} {D D}}
+} -result {{{}} O D}
test chan-io-39.22a {Tcl_SetChannelOption, invariance} -setup {
file delete $path(test1)
set l [list]
} -body {
set f1 [open $path(test1) w+]
- chan configure $f1 -eofchar {ON GO}
+ chan configure $f1 -eofchar {ON {}}
lappend l [chan configure $f1 -eofchar]
chan configure $f1 -eofchar D
lappend l [chan configure $f1 -eofchar]
lappend l [list [catch {chan configure $f1 -eofchar {1 2 3}} msg] $msg]
} -cleanup {
chan close $f1
-} -result {{O G} {D D} {1 {bad value for -eofchar: should be a list of zero, one, or two elements}}}
+} -result {O D {1 {bad value for -eofchar: should be a list of zero, one, or two elements}}}
test chan-io-39.23 {Tcl_GetChannelOption, server socket is not readable or\
writeable, it should still have valid -eofchar and -translation options} -setup {
set l [list]
diff --git a/tests/io.test b/tests/io.test
index 3241625..15ce577 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -2099,7 +2099,7 @@ test io-20.3 {Tcl_CreateChannel: initial settings} {unix} {
set x [list [fconfigure $f -eofchar] [fconfigure $f -translation]]
close $f
set x
-} {{{} {}} {auto lf}}
+} {{{}} {auto lf}}
set path(stdout) [makeFile {} stdout]
test io-20.5 {Tcl_CreateChannel: install channel in empty slot} stdio {
set f [open $path(script) w]
@@ -5038,7 +5038,7 @@ test io-35.6 {Tcl_Eof, eof char, lf write, auto read} {
set e [eof $f]
close $f
list $s $l $e
-} {9 8 1}
+} {8 8 1}
test io-35.7 {Tcl_Eof, eof char, lf write, lf read} {
file delete $path(test1)
set f [open $path(test1) w]
@@ -5052,7 +5052,7 @@ test io-35.7 {Tcl_Eof, eof char, lf write, lf read} {
set e [eof $f]
close $f
list $s $l $e
-} {9 8 1}
+} {8 8 1}
test io-35.8 {Tcl_Eof, eof char, cr write, auto read} {
file delete $path(test1)
set f [open $path(test1) w]
@@ -5066,7 +5066,7 @@ test io-35.8 {Tcl_Eof, eof char, cr write, auto read} {
set e [eof $f]
close $f
list $s $l $e
-} {9 8 1}
+} {8 8 1}
test io-35.9 {Tcl_Eof, eof char, cr write, cr read} {
file delete $path(test1)
set f [open $path(test1) w]
@@ -5080,7 +5080,7 @@ test io-35.9 {Tcl_Eof, eof char, cr write, cr read} {
set e [eof $f]
close $f
list $s $l $e
-} {9 8 1}
+} {8 8 1}
test io-35.10 {Tcl_Eof, eof char, crlf write, auto read} {
file delete $path(test1)
set f [open $path(test1) w]
@@ -5094,7 +5094,7 @@ test io-35.10 {Tcl_Eof, eof char, crlf write, auto read} {
set e [eof $f]
close $f
list $s $l $e
-} {11 8 1}
+} {10 8 1}
test io-35.11 {Tcl_Eof, eof char, crlf write, crlf read} {
file delete $path(test1)
set f [open $path(test1) w]
@@ -5108,7 +5108,7 @@ test io-35.11 {Tcl_Eof, eof char, crlf write, crlf read} {
set e [eof $f]
close $f
list $s $l $e
-} {11 8 1}
+} {10 8 1}
test io-35.12 {Tcl_Eof, eof char in middle, lf write, auto read} {
file delete $path(test1)
set f [open $path(test1) w]
@@ -5226,7 +5226,7 @@ test io-35.18a {Tcl_Eof, eof char, cr write, crlf read} -body {
set e [eof $f]
close $f
list $s $l $e [scan [string index $in end] %c]
-} -result {9 8 1 13}
+} -result {8 8 1 13}
test io-35.18b {Tcl_Eof, eof char, cr write, crlf read} -body {
file delete $path(test1)
set f [open $path(test1) w]
@@ -5240,7 +5240,7 @@ test io-35.18b {Tcl_Eof, eof char, cr write, crlf read} -body {
set e [eof $f]
close $f
list $s $l $e [scan [string index $in end] %c]
-} -result {2 1 1 13}
+} -result {1 1 1 13}
test io-35.18c {Tcl_Eof, eof char, cr write, crlf read} -body {
file delete $path(test1)
set f [open $path(test1) w]
@@ -5761,25 +5761,25 @@ test io-39.22 {Tcl_SetChannelOption, invariance} {unix} {
set f1 [open $path(test1) w+]
set l ""
lappend l [fconfigure $f1 -eofchar]
- fconfigure $f1 -eofchar {ON GO}
+ fconfigure $f1 -eofchar {ON {}}
lappend l [fconfigure $f1 -eofchar]
fconfigure $f1 -eofchar D
lappend l [fconfigure $f1 -eofchar]
close $f1
set l
-} {{{} {}} {O G} {D D}}
+} {{{}} O D}
test io-39.22a {Tcl_SetChannelOption, invariance} {
file delete $path(test1)
set f1 [open $path(test1) w+]
set l [list]
- fconfigure $f1 -eofchar {ON GO}
+ fconfigure $f1 -eofchar {ON {}}
lappend l [fconfigure $f1 -eofchar]
fconfigure $f1 -eofchar D
lappend l [fconfigure $f1 -eofchar]
lappend l [list [catch {fconfigure $f1 -eofchar {1 2 3}} msg] $msg]
close $f1
set l
-} {{O G} {D D} {1 {bad value for -eofchar: should be a list of zero, one, or two elements}}}
+} {O D {1 {bad value for -eofchar: should be a list of zero, one, or two elements}}}
test io-39.23 {Tcl_GetChannelOption, server socket is not readable or
writeable, it should still have valid -eofchar and -translation options } {
set l [list]
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 20418f3..c8daa96 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -1363,7 +1363,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 {{} {}} -nocomplainencoding 0 -strictencoding 0 -translation {auto *}}}
+} -result {{-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {} -nocomplainencoding 0 -strictencoding 0 -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 ""}
@@ -1372,7 +1372,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 {{} {}} -nocomplainencoding 0 -strictencoding 0 -translation {auto *}}}
+} -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {} -nocomplainencoding 0 -strictencoding 0 -translation {auto *}}}
test iocmd-25.3 {chan configure, cgetall, regular result} -match glob -body {
set res {}
proc foo {args} {
@@ -1384,7 +1384,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 {{} {}} -nocomplainencoding 0 -strictencoding 0 -translation {auto *} -bar foo -snarf x}}
+} -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -eofchar {} -nocomplainencoding 0 -strictencoding 0 -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} {