diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2024-03-27 15:46:06 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2024-03-27 15:46:06 (GMT) |
commit | a08d22d36c1527c3610c87c7d1ccdde308305d41 (patch) | |
tree | 7c39146e0b25cb4a564db5356af4d92dadc206ea /tests/string.test | |
parent | b31857f4b154b6ee2870deccbe42395fe4351b24 (diff) | |
download | tcl-a08d22d36c1527c3610c87c7d1ccdde308305d41.zip tcl-a08d22d36c1527c3610c87c7d1ccdde308305d41.tar.gz tcl-a08d22d36c1527c3610c87c7d1ccdde308305d41.tar.bz2 |
Tests for [edb4b065f49] crash.
Diffstat (limited to 'tests/string.test')
-rw-r--r-- | tests/string.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/string.test b/tests/string.test index 26cd8a7..1a0ac05 100644 --- a/tests/string.test +++ b/tests/string.test @@ -228,6 +228,15 @@ test string-2.36.$noComp {string compare, binary neq unequal length} { test string-2.37.$noComp {string compare with -length >= 2^32} { run {string compare -length 4294967296 ab abde} } -1 +test string-bug-edb4b065f4-1 {string compare empty string against byte array} { + string compare "" [binary decode hex 00] +} -1 +test string-bug-edb4b065f4-2 {string compare -length empty string against byte array} { + string compare -length 1 "" [binary decode hex 00] +} -1 +test string-bug-edb4b065f4-3 {string compare -nocase empty string against byte array} { + string compare -nocase "" [binary decode hex 00] +} -1 # only need a few tests on equal, since it uses the same code as # string compare, but just modifies the return output |