summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-07-05 05:08:56 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-07-05 05:08:56 (GMT)
commit0109dc8279103bead1cf16cc465c20bd190847b7 (patch)
treef9537f16cedaccd72666cf419a0dfc936c3a8e03 /tests
parent6bf04853ecf35bd3d5b034fd47b57e31d1d7a754 (diff)
parentb49afc700b71491f3ae17396d4ce473d4b067712 (diff)
downloadtcl-0109dc8279103bead1cf16cc465c20bd190847b7.zip
tcl-0109dc8279103bead1cf16cc465c20bd190847b7.tar.gz
tcl-0109dc8279103bead1cf16cc465c20bd190847b7.tar.bz2
Bug [5be203d6ca] - io-7.3 failure
Diffstat (limited to 'tests')
-rw-r--r--tests/chanio.test3
-rw-r--r--tests/io.test3
-rw-r--r--tests/tcltests.tcl1
-rw-r--r--tests/utfext.test8
4 files changed, 10 insertions, 5 deletions
diff --git a/tests/chanio.test b/tests/chanio.test
index fc8620f..c5d3aca 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -1090,10 +1090,9 @@ test chan-io-7.2 {FilterInputBytes: split up character in middle of buffer} -bod
} -cleanup {
chan close $f
} -result {10 1234567890 0}
-# This testcase fails in "debug" builds. See: [5be203d6ca]
test chan-io-7.3 {FilterInputBytes: split up character at EOF} -setup {
set x ""
-} -constraints {testchannel ndebug} -body {
+} -constraints {testchannel} -body {
set f [open $path(test1) w]
chan configure $f -encoding binary
chan puts -nonewline $f "1234567890123\x82\x4F\x82\x50\x82"
diff --git a/tests/io.test b/tests/io.test
index ad68bf1..ca636ce 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -1124,8 +1124,7 @@ test io-7.2 {FilterInputBytes: split up character in middle of buffer} {
close $f
set x
} [list 10 "1234567890" 0]
-# This testcase fails in "debug" builds. See: [5be203d6ca]
-test io-7.3 {FilterInputBytes: split up character at EOF} {testchannel ndebug} {
+test io-7.3 {FilterInputBytes: split up character at EOF} {testchannel} {
set f [open $path(test1) w]
fconfigure $f -encoding binary
puts -nonewline $f "1234567890123\x82\x4F\x82\x50\x82"
diff --git a/tests/tcltests.tcl b/tests/tcltests.tcl
index 0cabaaa..61366a4 100644
--- a/tests/tcltests.tcl
+++ b/tests/tcltests.tcl
@@ -8,7 +8,6 @@ namespace import ::tcltest::*
testConstraint exec [llength [info commands exec]]
testConstraint deprecated [expr {![tcl::build-info no-deprecate]}]
testConstraint debug [tcl::build-info debug]
-testConstraint ndebug [expr {![tcl::build-info debug]}]
testConstraint purify [tcl::build-info purify]
testConstraint debugpurify [
expr {
diff --git a/tests/utfext.test b/tests/utfext.test
index 149754e..70ef2bc 100644
--- a/tests/utfext.test
+++ b/tests/utfext.test
@@ -74,6 +74,14 @@ test xx-bufferoverflow {buffer overflow Tcl_ExternalToUtf} -body {
# % testencoding Tcl_ExternalToUtf utf-8 abcdefgh {start end noterminate charlimit} {} 20 rv wv cv
# nospace {} abcÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
+test TableToUtf-bug-5be203d6ca {Bug 5be203d6ca - truncated prefix in table encoding} -body {
+ set src \x82\x4f\x82\x50\x82
+ lassign [testencoding Tcl_ExternalToUtf shiftjis $src {start} 0 16 srcRead dstWritten charsWritten] buf
+ set result [list [testencoding Tcl_ExternalToUtf shiftjis $src {start} 0 16 srcRead dstWritten charsWritten] $srcRead $dstWritten $charsWritten]
+ lappend result {*}[list [testencoding Tcl_ExternalToUtf shiftjis [string range $src $srcRead end] {end} 0 10 srcRead dstWritten charsWritten] $srcRead $dstWritten $charsWritten]
+} -result [list [list multibyte 0 \xEF\xBC\x90\xEF\xBC\x91\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF] 4 6 2 [list ok 0 \xC2\x82\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF] 1 2 1]
+
+
::tcltest::cleanupTests
return