diff options
| author | dgp <dgp@users.sourceforge.net> | 2017-10-27 12:51:14 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2017-10-27 12:51:14 (GMT) |
| commit | 261012ce988b8bcfbb02a8e530d6535d4576217a (patch) | |
| tree | f947487bd4fbbb80a553b6ecc16b5b3418dd6743 | |
| parent | 3888c4fda4c6653768a1f71e9899806274a3ec1c (diff) | |
| parent | 2f8bbbe1415200584e62eed26701f98ca2c3aa9d (diff) | |
| download | tcl-261012ce988b8bcfbb02a8e530d6535d4576217a.zip tcl-261012ce988b8bcfbb02a8e530d6535d4576217a.tar.gz tcl-261012ce988b8bcfbb02a8e530d6535d4576217a.tar.bz2 | |
Update tests that were still written on the outdated premise that Tcl's encoding subsystem had to initialize starting in the identity encoding.
| -rw-r--r-- | tests/cmdAH.test | 8 | ||||
| -rw-r--r-- | tests/encoding.test | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 3c58c1b..e334dff 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -188,7 +188,7 @@ test cmdAH-4.5 {Tcl_EncodingObjCmd} -setup { test cmdAH-4.6 {Tcl_EncodingObjCmd} -setup { set system [encoding system] } -body { - encoding system identity + encoding system iso8859-1 encoding convertto jis0208 \u4e4e } -cleanup { encoding system $system @@ -210,7 +210,7 @@ test cmdAH-4.9 {Tcl_EncodingObjCmd} -setup { test cmdAH-4.10 {Tcl_EncodingObjCmd} -setup { set system [encoding system] } -body { - encoding system identity + encoding system iso8859-1 encoding convertfrom jis0208 8C } -cleanup { encoding system $system @@ -224,11 +224,11 @@ test cmdAH-4.12 {Tcl_EncodingObjCmd} -returnCodes error -body { test cmdAH-4.13 {Tcl_EncodingObjCmd} -setup { set system [encoding system] } -body { - encoding system identity + encoding system iso8859-1 encoding system } -cleanup { encoding system $system -} -result identity +} -result iso8859-1 test cmdAH-5.1 {Tcl_FileObjCmd} -returnCodes error -body { file diff --git a/tests/encoding.test b/tests/encoding.test index be1f4d5..fbf39ae 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -75,10 +75,11 @@ test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} -setup { encoding system shiftjis ;# incr ref count encoding dirs [list [pwd]] set x [encoding convertto shiftjis \u4e4e] ;# old one found - encoding system identity + encoding system iso8859-1 llength shiftjis ;# Shimmer away any cache of Tcl_Encoding lappend x [catch {encoding convertto shiftjis \u4e4e} msg] $msg } -cleanup { + encoding system iso8859-1 encoding system identity encoding dirs $path encoding system $system @@ -136,7 +137,7 @@ test encoding-5.1 {Tcl_SetSystemEncoding} -setup { encoding system jis0208 encoding convertto \u4e4e } -cleanup { - encoding system identity + encoding system iso8859-1 encoding system $old } -result {8C} test encoding-5.2 {Tcl_SetSystemEncoding: test ref count} { @@ -259,7 +260,7 @@ test encoding-11.5.1 {LoadEncodingFile: escape file} { test encoding-11.6 {LoadEncodingFile: invalid file} -constraints {testencoding} -setup { set system [encoding system] set path [encoding dirs] - encoding system identity + encoding system iso8859-1 } -body { cd [temporaryDirectory] encoding dirs [file join tmp encoding] |
