mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/fix-strcasestr-unit-test'
* origin/topic/timw/fix-strcasestr-unit-test: Fix the strcasestr unit test
This commit is contained in:
commit
c92b14fa40
3 changed files with 8 additions and 4 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
|||
5.2.0-dev.343 | 2022-11-18 09:40:51 -0700
|
||||
|
||||
* Fix the strcasestr unit test (Tim Wojtulewicz)
|
||||
|
||||
5.2.0-dev.341 | 2022-11-18 09:40:30 -0700
|
||||
|
||||
* spelling: repetitions (Josh Soref)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
5.2.0-dev.341
|
||||
5.2.0-dev.343
|
||||
|
|
|
@ -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