hare

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

commit 54432f7f75d5a6dd6e6c0146df3c4d232cb8b157
parent 3f85e4ea249e260e4b9bdff8e01571370781fca6
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat,  9 Dec 2023 21:14:43 -0500

strings: test contains with no variadic arguments

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

Diffstat:
Mstrings/contains.ha | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/strings/contains.ha b/strings/contains.ha @@ -34,4 +34,5 @@ export fn contains(haystack: str, needles: (str | rune)...) bool = { assert(!contains("hello world", "foobar", "foo", "bar")); assert(contains("hello world", 'h', "foo", "bar")); assert(!contains("hello world", 'x', "foo", "bar")); + assert(!contains("hello world")); };