hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 2a124e3c67aefa4cafbc1be9058e658fc486edfd
parent b7f1d4226cb5e5ba3e2852294e8ec2a52d21129a
Author: Sebastian <sebastian@sebsite.pw>
Date:   Wed, 13 Apr 2022 20:33:49 -0400

ascii: add more strcasecmp tests

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mascii/strcmp.ha | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ascii/strcmp.ha b/ascii/strcmp.ha @@ -38,5 +38,10 @@ export fn strcasecmp(a: str, b: str) int = { }; @test fn strcmp() void = { - assert(strcasecmp("ABC", "abc") as int == 0); + assert(strcasecmp("ABC", "ABC") == 0); + assert(strcasecmp("ABC", "abc") == 0); + assert(strcasecmp("ABC", "aB") > 0); + assert(strcasecmp("ab", "Abc") < 0); + assert(strcasecmp("bcd", "ABC") > 0); + assert(strcasecmp("ABC", "[[[") > 0); };