diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-07-02 03:03:30 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-07-02 03:03:30 (GMT) |
| commit | b863e0d57a44c15d8aecc4f7ae1f88749e7b3e7e (patch) | |
| tree | 15370115e4d46e76fc7373859a7efb8f210796a4 | |
| parent | 01785b73fb66a95f79452b4f16a517621c0e04d9 (diff) | |
| download | tcl-b863e0d57a44c15d8aecc4f7ae1f88749e7b3e7e.zip tcl-b863e0d57a44c15d8aecc4f7ae1f88749e7b3e7e.tar.gz tcl-b863e0d57a44c15d8aecc4f7ae1f88749e7b3e7e.tar.bz2 | |
Tests for [66ffafd309]
| -rw-r--r-- | tests/encoding.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/encoding.test b/tests/encoding.test index 6220cb2..2b7106f 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -1172,6 +1172,28 @@ test encoding-bug-6a3e2cb0f0-3 {Bug [6a3e2cb0f0] - invalid bytes in escape encod encoding convertfrom -profile replace iso2022-jp x\x1b\x7aaby } -result x\uFFFDy +test encoding-bug-66ffafd309-1-tcl8 {Bug [66ffafd309] - truncated DBCS} -body { + encoding convertfrom -profile tcl8 gb12345 x +} -result x +test encoding-bug-66ffafd309-1-strict {Bug [66ffafd309] - truncated DBCS} -body { + encoding convertfrom -profile strict gb12345 x +} -result {unexpected byte sequence starting at index 0: '\x78'} -returnCodes error +test encoding-bug-66ffafd309-1-replace {Bug [66ffafd309] - truncated DBCS} -body { + encoding convertfrom -profile replace gb12345 x +} -result \uFFFD +test encoding-bug-66ffafd309-2-tcl8 {Bug [66ffafd309] - invalid DBCS} -body { + # Not truncated but invalid + encoding convertfrom -profile tcl8 jis0208 \x78\x79 +} -result \x78\x79 +test encoding-bug-66ffafd309-2-strict {Bug [66ffafd309] - invalid DBCS} -body { + # Not truncated but invalid + encoding convertfrom -profile strict jis0208 \x78\x79 +} -result {unexpected byte sequence starting at index 1: '\x79'} -returnCodes error +test encoding-bug-66ffafd309-2-replace {Bug [66ffafd309] - invalid DBCS} -body { + # Not truncated but invalid + encoding convertfrom -profile replace jis0208 \x78\x79 +} -result \uFFFD\uFFFD + # cleanup namespace delete ::tcl::test::encoding ::tcltest::cleanupTests |
