diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-02-02 12:23:37 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-02-02 12:23:37 (GMT) |
commit | 26e89b4b3c03b100a2a461c034c1930a23a4273b (patch) | |
tree | 904021f206a8940b76693cb94b36283ddc8363b1 /tests/encoding.test | |
parent | 637e7224c9b4c5bde7709455dc262bdf476f9b4d (diff) | |
download | tcl-26e89b4b3c03b100a2a461c034c1930a23a4273b.zip tcl-26e89b4b3c03b100a2a461c034c1930a23a4273b.tar.gz tcl-26e89b4b3c03b100a2a461c034c1930a23a4273b.tar.bz2 |
Use common option parsing for ConvertfromObjCmd. Fix test error messages.
Diffstat (limited to 'tests/encoding.test')
-rw-r--r-- | tests/encoding.test | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/encoding.test b/tests/encoding.test index 813cd84..e4a2acb 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -718,13 +718,13 @@ test encoding-24.20 {Parse with -profile tcl8 but without providing encoding} -b } -result {wrong # args: should be "::tcl::encoding::convertfrom ??-profile profile? ?-failindex var? ?encoding?? data"} -returnCodes error test encoding-24.21 {Parse with -profile tcl8 but without providing encoding} -body { string length [encoding convertto -profile tcl8 "\x20"] -} -result {::tcl::encoding::convertto ??-profile profile? ?-failindex var? ?encoding?? data} -returnCodes error +} -result {wrong # args: should be "::tcl::encoding::convertto ??-profile profile? ?-failindex var? ?encoding?? data"} -returnCodes error test encoding-24.22 {Syntax error, two encodings} -body { encoding convertfrom iso8859-1 utf-8 "ZX\uD800" -} -returnCodes 1 -result {::tcl::encoding::convertto ??-profile profile? ?-failindex var? ?encoding?? data} +} -result {bad option "iso8859-1": must be -profile or -failindex} -returnCodes error test encoding-24.23 {Syntax error, two encodings} -body { encoding convertto iso8859-1 utf-8 "ZX\uD800" -} -returnCodes 1 -result {::tcl::encoding::convertto ??-profile profile? ?-failindex var? ?encoding?? data} +} -result {bad option "iso8859-1": must be -profile or -failindex} -returnCodes error test encoding-24.24 {Parse invalid utf-8 with -profile strict} -body { encoding convertfrom -profile strict utf-8 "\xC0\x80\x00\x00" } -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\xC0'} |