summaryrefslogtreecommitdiffstats
path: root/tests/ioCmd.test
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-02-02 16:43:12 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-02-02 16:43:12 (GMT)
commit100d8ce724b2ed4d9f15a045bc2e48119b53465f (patch)
treec8b2e9165dbead0dff99e1cecaf8c4c3a7e731ff /tests/ioCmd.test
parente31133e3b0149b9bc29c9c6f06e76ccc6994df7e (diff)
downloadtcl-100d8ce724b2ed4d9f15a045bc2e48119b53465f.zip
tcl-100d8ce724b2ed4d9f15a045bc2e48119b53465f.tar.gz
tcl-100d8ce724b2ed4d9f15a045bc2e48119b53465f.tar.bz2
Update tests to use -encodingprofile
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r--tests/ioCmd.test26
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 1a72f70..8c9d870 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -207,7 +207,7 @@ test iocmd-7.5 {close command} -setup {
proc expectedOpts {got extra} {
set basicOpts {
- -blocking -buffering -buffersize -encoding -eofchar -nocomplainencoding -strictencoding -translation
+ -blocking -buffering -buffersize -encoding -encodingprofile -eofchar -translation
}
set opts [list {*}$basicOpts {*}$extra]
lset opts end [string cat "or " [lindex $opts end]]
@@ -240,33 +240,33 @@ test iocmd-8.7 {fconfigure command} -setup {
file delete $path(test1)
} -body {
set f1 [open $path(test1) w]
- fconfigure $f1 -translation lf -eofchar {} -encoding utf-16 -nocomplainencoding 1
+ fconfigure $f1 -translation lf -eofchar {} -encoding utf-16 -encodingprofile tcl8
fconfigure $f1
} -cleanup {
catch {close $f1}
-} -result {-blocking 1 -buffering full -buffersize 4096 -encoding utf-16 -eofchar {} -nocomplainencoding 1 -strictencoding 0 -translation lf}
+} -result {-blocking 1 -buffering full -buffersize 4096 -encoding utf-16 -encodingprofile tcl8 -eofchar {} -translation lf}
test iocmd-8.8 {fconfigure command} -setup {
file delete $path(test1)
set x {}
} -body {
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -buffering line -buffersize 3030 \
- -eofchar {} -encoding utf-16 -nocomplainencoding 1
+ -eofchar {} -encoding utf-16 -encodingprofile tcl8
lappend x [fconfigure $f1 -buffering]
lappend x [fconfigure $f1]
} -cleanup {
catch {close $f1}
-} -result {line {-blocking 1 -buffering line -buffersize 3030 -encoding utf-16 -eofchar {} -nocomplainencoding 1 -strictencoding 0 -translation lf}}
+} -result {line {-blocking 1 -buffering line -buffersize 3030 -encoding utf-16 -encodingprofile tcl8 -eofchar {} -translation lf}}
test iocmd-8.9 {fconfigure command} -setup {
file delete $path(test1)
} -body {
set f1 [open $path(test1) w]
fconfigure $f1 -translation binary -buffering none -buffersize 4040 \
- -eofchar {} -encoding binary -nocomplainencoding 1
+ -eofchar {} -encoding binary -encodingprofile tcl8
fconfigure $f1
} -cleanup {
catch {close $f1}
-} -result {-blocking 1 -buffering none -buffersize 4040 -encoding binary -eofchar {} -nocomplainencoding 1 -strictencoding 0 -translation lf}
+} -result {-blocking 1 -buffering none -buffersize 4040 -encoding binary -encodingprofile tcl8 -eofchar {} -translation lf}
test iocmd-8.10 {fconfigure command} -returnCodes error -body {
fconfigure a b
} -result {can not find channel named "a"}
@@ -369,7 +369,7 @@ test iocmd-8.20 {fconfigure command / win console channel} -constraints {nonPort
# 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
+ deprecated obsolete
} -setup {
# I don't know how else to open the console, but this is non-portable
set console stdin
@@ -378,7 +378,9 @@ test iocmd-8.21 {fconfigure command / -nocomplainencoding 0 error} -constraints
} -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 oldmode [fconfigure $console -strictencoding]
+ set oldprofile [fconfigure $console -encodingprofile]
+} -constraints {
+ obsolete
} -body {
fconfigure $console -strictencoding 1
fconfigure $console -nocomplainencoding 0
@@ -1381,7 +1383,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 * -strictencoding 0 -translation {auto *}}}
+} -result {{-blocking 1 -buffering full -buffersize 4096 -encoding * -encodingprofile * -eofchar {{} {}} -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 ""}
@@ -1390,7 +1392,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 * -strictencoding 0 -translation {auto *}}}
+} -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -encodingprofile * -eofchar {{} {}} -translation {auto *}}}
test iocmd-25.3 {chan configure, cgetall, regular result} -match glob -body {
set res {}
proc foo {args} {
@@ -1402,7 +1404,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 * -strictencoding 0 -translation {auto *} -bar foo -snarf x}}
+} -result {{cgetall rc*} {-blocking 1 -buffering full -buffersize 4096 -encoding * -encodingprofile * -eofchar {{} {}} -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} {