Added more tests + fixed evstr issues
Run tests / Run tests (push) Successful in 11s

This commit is contained in:
2026-05-04 21:44:32 +03:00
parent 7c4768a3dd
commit 2c74b727ef
10 changed files with 167 additions and 10 deletions
+23
View File
@@ -0,0 +1,23 @@
#define EV_STR_IMPLEMENTATION
#include "ev_str.h"
#include <assert.h>
int main(void)
{
evstring_view search_results[2];
evstring text = evstr("aaa");
evstring query = evstr("aa");
assert(evstring_findAll(text, query, search_results) == 2);
assert(search_results[0].data == text);
assert(search_results[0].len == 2);
assert(search_results[0].offset == 0);
assert(search_results[1].data == text);
assert(search_results[1].len == 2);
assert(search_results[1].offset == 1);
return 0;
}