summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-03-02 06:41:39 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-03-02 06:41:39 (GMT)
commit44fdf09f7bf8a1e0ae30d1eaea83d5cd1d2fdca2 (patch)
tree06fec4df4647eeed2921e41accf58eed100d556f /tests
parentb2cdedcec2bbb94929cef675635c5864db8db8de (diff)
downloadtcl-44fdf09f7bf8a1e0ae30d1eaea83d5cd1d2fdca2.zip
tcl-44fdf09f7bf8a1e0ae30d1eaea83d5cd1d2fdca2.tar.gz
tcl-44fdf09f7bf8a1e0ae30d1eaea83d5cd1d2fdca2.tar.bz2
Bug [e778e3f804]. Fix error message for invalid profile name.
Diffstat (limited to 'tests')
-rw-r--r--tests/encoding.test8
-rw-r--r--tests/io.test2
-rw-r--r--tests/ioCmd.test4
3 files changed, 13 insertions, 1 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index 800d93b..a51b6c0 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -105,6 +105,14 @@ test encoding-3.2 {Tcl_GetEncodingName, non-null} -setup {
} -cleanup {
fconfigure stdout -encoding $old
} -result {jis0208}
+test encoding-3.3 {fconfigure -encodingprofile} -setup {
+ set old [fconfigure stdout -encodingprofile]
+} -body {
+ fconfigure stdout -encodingprofile replace
+ fconfigure stdout -encodingprofile
+} -cleanup {
+ fconfigure stdout -encodingprofile $old
+} -result replace
test encoding-4.1 {Tcl_GetEncodingNames} -constraints {testencoding} -setup {
cd [makeDirectory tmp]
diff --git a/tests/io.test b/tests/io.test
index 66dee7d..836a9b8 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -7622,7 +7622,7 @@ test io-52.20 {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
fcopy $in $out
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 8c9d870..23cd67e 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -390,6 +390,10 @@ test iocmd-8.22 {fconfigure command / -nocomplainencoding 0, no error if -strict
} -result 0
+test iocmd-8.21 {fconfigure -encodingprofile badprofile} -body {
+ fconfigure stdin -encodingprofile froboz
+} -returnCodes error -result {bad profile name "froboz": must be replace, strict, or tcl8}
+
test iocmd-9.1 {eof command} {
list [catch {eof} msg] $msg $::errorCode
} {1 {wrong # args: should be "eof channelId"} {TCL WRONGARGS}}