summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests-perf/chan.perf.tcl6
-rw-r--r--tests/chanio.test24
-rw-r--r--tests/encoding.test8
-rw-r--r--tests/ioCmd.test5
4 files changed, 21 insertions, 22 deletions
diff --git a/tests-perf/chan.perf.tcl b/tests-perf/chan.perf.tcl
index 56acccf..6bc9204 100644
--- a/tests-perf/chan.perf.tcl
+++ b/tests-perf/chan.perf.tcl
@@ -27,12 +27,12 @@ namespace path {::tclTestPerf}
proc _get_test_chan {{bufSize 4096}} {
lassign [chan pipe] ch wch;
- fconfigure $ch -translation binary -encoding utf-8 -buffersize $bufSize -buffering full
- fconfigure $wch -translation binary -encoding utf-8 -buffersize $bufSize -buffering full
+ fconfigure $ch -translation lf -encoding utf-8 -buffersize $bufSize -buffering full
+ fconfigure $wch -translation lf -encoding utf-8 -buffersize $bufSize -buffering full
exec [info nameofexecutable] -- $bufSize >@$wch << {
set bufSize [lindex $::argv end]
- fconfigure stdout -translation binary -encoding utf-8 -buffersize $bufSize -buffering full
+ fconfigure stdout -translation lf -encoding utf-8 -buffersize $bufSize -buffering full
set buf [string repeat test 1000]; # 4K
# write ~ 10*1M + 10*2M + 10*10M + 1*20M:
set i 0; while {$i < int((10*1e6 + 10*2e6 + 10*10e6 + 1*20e6)/4e3)} {
diff --git a/tests/chanio.test b/tests/chanio.test
index 0766c35..fb566d4 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -6649,7 +6649,7 @@ test chan-io-52.3 {TclCopyChannel} -constraints {fcopy} -setup {
} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
- chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
+ chan configure $f1 -translation binary -blocking 0
chan configure $f2 -translation cr -encoding iso8859-1 -blocking 0
set s0 [chan copy $f1 $f2]
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
@@ -6680,8 +6680,8 @@ test chan-io-52.5 {TclCopyChannel, all} -constraints {fcopy} -setup {
} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
- chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
- chan configure $f2 -translation lf -encoding iso8859-1 -blocking 0
+ chan configure $f1 -translation binary -blocking 0
+ chan configure $f2 -translation binary -blocking 0
chan copy $f1 $f2 -size -1 ;# -1 means 'copy all', same as if no -size specified.
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
chan close $f1
@@ -6696,8 +6696,8 @@ test chan-io-52.5a {TclCopyChannel, all, other negative value} -setup {
} -constraints {fcopy} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
- chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
- chan configure $f2 -translation lf -encoding iso8859-1 -blocking 0
+ chan configure $f1 -translation binary -blocking 0
+ chan configure $f2 -translation binary -blocking 0
chan copy $f1 $f2 -size -2 ;# < 0 behaves like -1, copy all
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
chan close $f1
@@ -6712,8 +6712,8 @@ test chan-io-52.5b {TclCopyChannel, all, wrap to negative value} -setup {
} -constraints {fcopy} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
- chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
- chan configure $f2 -translation lf -encoding iso8859-1 -blocking 0
+ chan configure $f1 -translation binary -blocking 0
+ chan configure $f2 -translation binary -blocking 0
chan copy $f1 $f2 -size 3221176172 ;# Wrapped to < 0, behaves like -1, copy all
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
chan close $f1
@@ -6728,8 +6728,8 @@ test chan-io-52.6 {TclCopyChannel} -setup {
} -constraints {fcopy} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
- chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
- chan configure $f2 -translation lf -encoding iso8859-1 -blocking 0
+ chan configure $f1 -translation binary -blocking 0
+ chan configure $f2 -translation binary -blocking 0
set s0 [chan copy $f1 $f2 -size [expr {[file size $thisScript] + 5}]]
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
chan close $f1
@@ -6746,8 +6746,8 @@ test chan-io-52.7 {TclCopyChannel} -constraints {fcopy} -setup {
} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
- chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
- chan configure $f2 -translation lf -encoding iso8859-1 -blocking 0
+ chan configure $f1 -translation binary -blocking 0
+ chan configure $f2 -translation binary -blocking 0
chan copy $f1 $f2
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
if {[file size $thisScript] == [file size $path(test1)]} {
@@ -6864,7 +6864,7 @@ test chan-io-53.2 {CopyData} -setup {
} -constraints {fcopy} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
- chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
+ chan configure $f1 -translation binary -blocking 0
chan configure $f2 -translation cr -encoding iso8859-1 -blocking 0
chan copy $f1 $f2 -command [namespace code {set s0}]
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
diff --git a/tests/encoding.test b/tests/encoding.test
index 3feaa55..93a52aa 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -183,11 +183,11 @@ test encoding-7.2 {Tcl_UtfToExternalDString: big buffer} {
test encoding-8.1 {Tcl_ExternalToUtf} {
set f [open [file join [temporaryDirectory] dummy] w]
- fconfigure $f -translation binary -encoding iso8859-1
+ fconfigure $f -translation binary
puts -nonewline $f "ab\x8C\xC1g"
close $f
set f [open [file join [temporaryDirectory] dummy] r]
- fconfigure $f -translation binary -encoding shiftjis
+ fconfigure $f -translation lf -encoding shiftjis
set x [read $f]
close $f
file delete [file join [temporaryDirectory] dummy]
@@ -211,11 +211,11 @@ test encoding-9.2 {Tcl_UtfToExternalDString: big buffer} {
test encoding-10.1 {Tcl_UtfToExternal} {
set f [open [file join [temporaryDirectory] dummy] w]
- fconfigure $f -translation binary -encoding shiftjis
+ fconfigure $f -translation lf -encoding shiftjis
puts -nonewline $f "ab\u4E4Eg"
close $f
set f [open [file join [temporaryDirectory] dummy] r]
- fconfigure $f -translation binary -encoding iso8859-1
+ fconfigure $f -translation binary
set x [read $f]
close $f
file delete [file join [temporaryDirectory] dummy]
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 74fabe7..b167475 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -61,7 +61,7 @@ test iocmd-1.7 {puts command} {
} 7
test iocmd-1.8 {puts command} {
set f [open $path(test1) w]
- fconfigure $f -translation lf -eofchar {} -encoding iso8859-1
+ fconfigure $f -translation binary
puts -nonewline $f [binary format a4a5 foo bar]
close $f
file size $path(test1)
@@ -249,8 +249,7 @@ test iocmd-8.8 {fconfigure command} {
test iocmd-8.9 {fconfigure command} {
file delete $path(test1)
set f1 [open $path(test1) w]
- fconfigure $f1 -translation binary -buffering none -buffersize 4040 \
- -eofchar {} -encoding binary
+ fconfigure $f1 -translation binary -buffering none -buffersize 4040
set x [fconfigure $f1]
close $f1
set x