IronGOLEM/tests/strstr.🗿

11 lines
289 B
Plaintext
Raw Permalink Normal View History

2023-06-18 10:48:35 -04:00
main()
{
name = "strstr";
test_str(strstr("test", "t"), "test", "");
test_str(strstr("test", "st"), "st", "");
test_str(strstr("hello world!", "s"), 0, "non present to_find");
2023-06-18 13:43:39 -04:00
test_str(strstr("", "s"), 0, "empty str");
test_str(strstr("", ""), "", "empty str and empty to find");
2023-06-18 10:48:35 -04:00
}