summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test42
1 files changed, 21 insertions, 21 deletions
diff --git a/tests/io.test b/tests/io.test
index 6821ff3..c33646a 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -272,7 +272,7 @@ test io-3.4 {WriteChars: loop over stage buffer} -body {
# stage buffer maps to more than can be queued at once.
set f [open $path(test1) w]
- fconfigure $f -encoding jis0208 -buffersize 16 -nocomplainencoding 1
+ fconfigure $f -encoding jis0208 -buffersize 16 -encodingprofile tcl8
puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
set x [list [contents $path(test1)]]
close $f
@@ -286,7 +286,7 @@ test io-3.5 {WriteChars: saved != 0} -body {
# requested buffersize.
set f [open $path(test1) w]
- fconfigure $f -encoding jis0208 -buffersize 17 -nocomplainencoding 1
+ fconfigure $f -encoding jis0208 -buffersize 17 -encodingprofile tcl8
puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
set x [list [contents $path(test1)]]
close $f
@@ -319,7 +319,7 @@ test io-3.7 {WriteChars: (bufPtr->nextAdded > bufPtr->length)} -body {
# of the next channel buffer.
set f [open $path(test1) w]
- fconfigure $f -encoding jis0208 -buffersize 17 -nocomplainencoding 1
+ fconfigure $f -encoding jis0208 -buffersize 17 -encodingprofile tcl8
puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
set x [list [contents $path(test1)]]
close $f
@@ -7623,7 +7623,7 @@ test io-52.21 {TclCopyChannel & encodings} -setup {
# Using "-encoding ascii" means writing the "Á" gives an error
fconfigure $in -encoding utf-8
- fconfigure $out -encoding ascii -translation lf -strictencoding 1
+ fconfigure $out -encoding ascii -translation lf -encodingprofile strict
fcopy $in $out
} -cleanup {
@@ -7643,7 +7643,7 @@ test io-52.22 {TclCopyChannel & encodings} -setup {
set out [open $path(kyrillic.txt) w]
# Using "-encoding ascii" means reading the "Á" gives an error
- fconfigure $in -encoding ascii -strictencoding 1
+ fconfigure $in -encoding ascii -encodingprofile strict
fconfigure $out -encoding koi8-r -translation lf
proc ::xxx args {
set ::s0 $args
@@ -7671,7 +7671,7 @@ test io-52.23 {TclCopyChannel & encodings} -setup {
# Using "-encoding ascii" means writing the "Á" gives an error
fconfigure $in -encoding utf-8
- fconfigure $out -encoding ascii -translation lf -strictencoding 1
+ fconfigure $out -encoding ascii -translation lf -encodingprofile strict
proc ::xxx args {
set ::s0 $args
}
@@ -9040,7 +9040,7 @@ test io-75.1 {multibyte encoding error read results in raw bytes} -setup {
puts -nonewline $f A\xC0\x40
flush $f
seek $f 0
- fconfigure $f -encoding utf-8 -nocomplainencoding 1 -buffering none
+ fconfigure $f -encoding utf-8 -encodingprofile tcl8 -buffering none
} -body {
set d [read $f]
binary scan $d H* hd
@@ -9050,10 +9050,10 @@ test io-75.1 {multibyte encoding error read results in raw bytes} -setup {
removeFile io-75.1
} -result 41c040
-test io-75.2 {unrepresentable character write passes and is replaced by ? (-nocomplainencoding 1)} -setup {
+test io-75.2 {unrepresentable character write passes and is replaced by ? (-encodingprofile tcl8)} -setup {
set fn [makeFile {} io-75.2]
set f [open $fn w+]
- fconfigure $f -encoding iso8859-1 -nocomplainencoding 1
+ fconfigure $f -encoding iso8859-1 -encodingprofile tcl8
} -body {
puts -nonewline $f A\u2022
flush $f
@@ -9067,14 +9067,14 @@ test io-75.2 {unrepresentable character write passes and is replaced by ? (-noco
# Incomplete sequence test.
# This error may IMHO only be detected with the close.
# But the read already returns the incomplete sequence.
-test io-75.3 {incomplete multibyte encoding read is ignored (-nocomplainencoding 1)} -setup {
+test io-75.3 {incomplete multibyte encoding read is ignored (-encodingprofile tcl8)} -setup {
set fn [makeFile {} io-75.3]
set f [open $fn w+]
fconfigure $f -encoding binary
puts -nonewline $f "A\xC0"
flush $f
seek $f 0
- fconfigure $f -encoding utf-8 -buffering none -nocomplainencoding 1
+ fconfigure $f -encoding utf-8 -buffering none -encodingprofile tcl8
} -body {
set d [read $f]
close $f
@@ -9086,7 +9086,7 @@ test io-75.3 {incomplete multibyte encoding read is ignored (-nocomplainencoding
# As utf-8 has a special treatment in multi-byte decoding, also test another
# one.
-test io-75.4 {shiftjis encoding error read results in raw bytes (-nocomplainencoding 1)} -setup {
+test io-75.4 {shiftjis encoding error read results in raw bytes (-encodingprofile tcl8)} -setup {
set fn [makeFile {} io-75.4]
set f [open $fn w+]
fconfigure $f -encoding binary
@@ -9095,7 +9095,7 @@ test io-75.4 {shiftjis encoding error read results in raw bytes (-nocomplainenco
puts -nonewline $f A\x81\xFFA
flush $f
seek $f 0
- fconfigure $f -encoding shiftjis -buffering none -eofchar "" -translation lf -nocomplainencoding 1
+ fconfigure $f -encoding shiftjis -buffering none -eofchar "" -translation lf -encodingprofile tcl8
} -body {
set d [read $f]
binary scan $d H* hd
@@ -9105,14 +9105,14 @@ test io-75.4 {shiftjis encoding error read results in raw bytes (-nocomplainenco
removeFile io-75.4
} -result 4181ff41
-test io-75.5 {invalid utf-8 encoding read is ignored (-nocomplainencoding 1)} -setup {
+test io-75.5 {invalid utf-8 encoding read is ignored (-encodingprofile tcl8)} -setup {
set fn [makeFile {} io-75.5]
set f [open $fn w+]
fconfigure $f -encoding binary
puts -nonewline $f A\x81
flush $f
seek $f 0
- fconfigure $f -encoding utf-8 -buffering none -eofchar "" -translation lf -nocomplainencoding 1
+ fconfigure $f -encoding utf-8 -buffering none -eofchar "" -translation lf -encodingprofile tcl8
} -body {
set d [read $f]
close $f
@@ -9122,7 +9122,7 @@ test io-75.5 {invalid utf-8 encoding read is ignored (-nocomplainencoding 1)} -s
removeFile io-75.5
} -result 4181
-test io-75.8 {invalid utf-8 encoding eof handling (-strictencoding 1)} -setup {
+test io-75.8 {invalid utf-8 encoding eof handling (-encodingprofile strict)} -setup {
set fn [makeFile {} io-75.8]
set f [open $fn w+]
fconfigure $f -encoding binary
@@ -9130,7 +9130,7 @@ test io-75.8 {invalid utf-8 encoding eof handling (-strictencoding 1)} -setup {
puts -nonewline $f A\x1A\x81
flush $f
seek $f 0
- fconfigure $f -encoding utf-8 -buffering none -eofchar \x1A -translation lf -strictencoding 1
+ fconfigure $f -encoding utf-8 -buffering none -eofchar \x1A -translation lf -encodingprofile strict
} -body {
set d [read $f]
binary scan $d H* hd
@@ -9145,7 +9145,7 @@ test io-75.8 {invalid utf-8 encoding eof handling (-strictencoding 1)} -setup {
test io-75.9 {unrepresentable character write passes and is replaced by ?} -setup {
set fn [makeFile {} io-75.9]
set f [open $fn w+]
- fconfigure $f -encoding iso8859-1 -strictencoding 1
+ fconfigure $f -encoding iso8859-1 -encodingprofile strict
} -body {
catch {puts -nonewline $f "A\u2022"} msg
flush $f
@@ -9189,7 +9189,7 @@ test io-75.11 {shiftjis encoding error read results in raw bytes} -setup {
puts -nonewline $f A\x81\xFFA
flush $f
seek $f 0
- fconfigure $f -encoding shiftjis -buffering none -eofchar "" -translation lf -strictencoding 1
+ fconfigure $f -encoding shiftjis -buffering none -eofchar "" -translation lf -encodingprofile strict
} -body {
set d [read $f]
binary scan $d H* hd
@@ -9216,7 +9216,7 @@ test io-75.12 {invalid utf-8 encoding read is ignored} -setup {
} -cleanup {
removeFile io-75.12
} -result 4181
-test io-75.13 {invalid utf-8 encoding read is not ignored (-strictencoding 1)} -setup {
+test io-75.13 {invalid utf-8 encoding read is not ignored (-encodingprofile strict)} -setup {
set fn [makeFile {} io-75.13]
set f [open $fn w+]
fconfigure $f -encoding binary
@@ -9224,7 +9224,7 @@ test io-75.13 {invalid utf-8 encoding read is not ignored (-strictencoding 1)} -
puts -nonewline $f "A\x81"
flush $f
seek $f 0
- fconfigure $f -encoding utf-8 -buffering none -eofchar "" -translation lf -strictencoding 1
+ fconfigure $f -encoding utf-8 -buffering none -eofchar "" -translation lf -encodingprofile strict
} -body {
set d [read $f]
binary scan $d H* hd