summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-29 09:42:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-29 09:42:42 (GMT)
commitdc84eca339d2be8913965c070a8e99e532326934 (patch)
treee7e056c2a4a4663091c5315878cae59b779a750b /tests
parentf15717bcda464e47bc87ba9545d00f69ab4077c1 (diff)
downloadtcl-dc84eca339d2be8913965c070a8e99e532326934.zip
tcl-dc84eca339d2be8913965c070a8e99e532326934.tar.gz
tcl-dc84eca339d2be8913965c070a8e99e532326934.tar.bz2
3 new testcases
Diffstat (limited to 'tests')
-rw-r--r--tests/string.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/string.test b/tests/string.test
index b5efc8c..11c1952 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -141,6 +141,18 @@ test string-2.33 {string compare, high bit} {
proc foo {} {string compare "\x00\x00" "\x00\x01"}
foo
} -1
+test string-2.34 {string compare, binary equal} {
+ proc foo {} {string compare [binary format a100 0] [binary format a100 0]}
+ foo
+} 0
+test string-2.35 {string compare, binary neq} {
+ proc foo {} {string compare [binary format a100a 0 1] [binary format a100a 0 0]}
+ foo
+} 1
+test string-2.36 {string compare, binary neq unequal length} {
+ proc foo {} {string compare [binary format a20a 0 1] [binary format a100a 0 0]}
+ foo
+} 1
# only need a few tests on equal, since it uses the same code as
# string compare, but just modifies the return output