blob: ad37f373d56990ea7ae52b61e5287aac7f31cde8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// SPDX-License-Identifier: MIT
/*
* Behavior Correctness Test for HX_strchr2
*/
#include <libHX/string.h>
static const char alphabet[] = "abcdefghijklmnopqrstuvwxyz";
int main(void)
{
char *z;
z = HX_strchr2("qfm!bar", alphabet);
if (z == NULL || *z != '!')
return EXIT_FAILURE;
z = HX_strchr2("qfmxbar", alphabet);
if (z != NULL)
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
|