diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-01-25 10:02:27 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-01-25 10:02:27 (GMT) |
commit | 7426076e0fd6bea248ea4e734e8cc88d0626a2e3 (patch) | |
tree | d54d9f91c62f54e5223b5fc503c0ea6b8adaee97 /tests/encoding.test | |
parent | 1dd572d476fbff934a84ba34dddbad744ce96091 (diff) | |
parent | ca4e244cca3e93fb8689fe1cef85954da16ff989 (diff) | |
download | tcl-7426076e0fd6bea248ea4e734e8cc88d0626a2e3.zip tcl-7426076e0fd6bea248ea4e734e8cc88d0626a2e3.tar.gz tcl-7426076e0fd6bea248ea4e734e8cc88d0626a2e3.tar.bz2 |
Test TableFromUtfProc() with strict handling of encoding errors.
Diffstat (limited to 'tests/encoding.test')
-rw-r--r-- | tests/encoding.test | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/encoding.test b/tests/encoding.test index 61676ea..90e81dd 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -513,8 +513,11 @@ test encoding-17.10 {Utf32ToUtfProc} -body { encoding convertfrom -nocomplain utf-32 "\xFF\xFF\xFF\xFF" } -result \uFFFD -test encoding-18.1 {TableToUtfProc} { -} {} + +test encoding-18.1 {TableToUtfProc error on invalid input with -strict} -body { + list [catch {encoding convertto -strict jis0208 \\} res] $res +} -result {1 {unexpected character at index 0: 'U+00005C'}} + test encoding-19.1 {TableFromUtfProc} { } {} @@ -915,6 +918,7 @@ test encoding-29.0 {get encoding nul terminator lengths} -constraints { [testencoding nullength ksc5601] } -result {1 2 4 2 2} + # cleanup namespace delete ::tcl::test::encoding ::tcltest::cleanupTests |