summaryrefslogtreecommitdiffstats
path: root/tests/binary.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-03-12 17:29:33 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-03-12 17:29:33 (GMT)
commit46e5b17ffbd7d678e0113f8564deaeb32f137a82 (patch)
tree30296b93edba2cabd77da8925fd5738015dfd21a /tests/binary.test
parent2cd124a28ea369d484197163cccb49acedc5e288 (diff)
downloadtcl-46e5b17ffbd7d678e0113f8564deaeb32f137a82.zip
tcl-46e5b17ffbd7d678e0113f8564deaeb32f137a82.tar.gz
tcl-46e5b17ffbd7d678e0113f8564deaeb32f137a82.tar.bz2
Add some testing of Tcl_SetByteArrayLength().
Diffstat (limited to 'tests/binary.test')
-rw-r--r--tests/binary.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/binary.test b/tests/binary.test
index 8c1dedb..92fb648 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -2889,6 +2889,17 @@ test binary-76.2 {binary string appending growth algorithm} win {
# Append to it
string length [append str [binary format a* foo]]
} 3
+
+testConstraint testsetbytearraylength \
+ [expr {"testsetbytearraylength" in [info commands]}]
+
+test binary-77.1 {Tcl_SetByteArrayLength} testsetbytearraylength {
+ testsetbytearraylength [string cat A B C] 1
+} A
+test binary-77.2 {Tcl_SetByteArrayLength} testsetbytearraylength {
+ testsetbytearraylength [string cat \u0141 B C] 1
+} A
+
# ----------------------------------------------------------------------
# cleanup