diff options
author | dgp <dgp@users.sourceforge.net> | 2020-03-30 14:52:55 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2020-03-30 14:52:55 (GMT) |
commit | 3d26bf2941bb78c8538f4b9e5abfdcfee819c6f3 (patch) | |
tree | ddbd0b948aabc3076d1006210799ede92c5403a3 /tests | |
parent | 9721695db88107ac306309f8b33133281f469fc2 (diff) | |
download | tcl-3d26bf2941bb78c8538f4b9e5abfdcfee819c6f3.zip tcl-3d26bf2941bb78c8538f4b9e5abfdcfee819c6f3.tar.gz tcl-3d26bf2941bb78c8538f4b9e5abfdcfee819c6f3.tar.bz2 |
When Tcl_SetByteArrayLength truncates a value, demand only that the truncated
range must be a proper byte sequence.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/binary.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/binary.test b/tests/binary.test index bb8560d..a764dd6 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -2934,6 +2934,18 @@ test binary-79.1 {Tcl_SetByteArrayLength} testsetbytearraylength { test binary-79.2 {Tcl_SetByteArrayLength} -body { testsetbytearraylength [string cat \u0141 B C] 1 } -constraints testsetbytearraylength -returnCodes error -match glob -result * +test binary-79.3 {Tcl_SetByteArrayLength} testsetbytearraylength { + testsetbytearraylength [string cat A B \u0141] 0 +} {} +test binary-79.4 {Tcl_SetByteArrayLength} testsetbytearraylength { + testsetbytearraylength [string cat A B \u0141] 1 +} A +test binary-79.5 {Tcl_SetByteArrayLength} testsetbytearraylength { + testsetbytearraylength [string cat A B \u0141] 2 +} AB +test binary-79.6 {Tcl_SetByteArrayLength} -body { + testsetbytearraylength [string cat A B \u0141] 3 +} -constraints testsetbytearraylength -returnCodes error -match glob -result * # ---------------------------------------------------------------------- |