Files
RedBear-OS/tests/string/strpbrk.c
T
Tibor Nagy 4381bb2a22 tests: Remove redundant return statements
When the execution reaches the end of the main functions, they implicitly return a successful status.
2019-02-20 21:09:03 +01:00

19 lines
521 B
C

#include <string.h>
#include <stdio.h>
int main(void) {
char* source = "The quick drawn fix jumps over the lazy bug";
// should be "The quick drawn fix jumps over the lazy bug"
char* res1 = strpbrk(source, "From The Very Beginning");
printf("%s\n", (res1) ? res1 : "NULL");
// should be "lazy bug"
char* res2 = strpbrk(source, "lzbg");
printf("%s\n", (res2) ? res2 : "NULL");
// should be "NULL"
char* res3 = strpbrk(source, "404");
printf("%s\n", (res3) ? res3 : "NULL");
}