mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Fix the strcasestr unit test
This commit is contained in:
parent
ec3eca0549
commit
ca8f82a574
1 changed files with 3 additions and 3 deletions
|
@ -1375,14 +1375,14 @@ char* strcasestr(const char* s, const char* find)
|
|||
TEST_CASE("util strcasestr")
|
||||
{
|
||||
const char* s = "this is a string";
|
||||
const char* out = strcasestr(s, "is");
|
||||
const char* out = strcasestr(s, "is a");
|
||||
CHECK(strcmp(out, "is a string") == 0);
|
||||
|
||||
const char* out2 = strcasestr(s, "IS");
|
||||
const char* out2 = strcasestr(s, "Is A");
|
||||
CHECK(strcmp(out2, "is a string") == 0);
|
||||
|
||||
const char* out3 = strcasestr(s, "not there");
|
||||
CHECK(strcmp(out2, s) == 0);
|
||||
CHECK(out3 == nullptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue