xref: /freebsd/contrib/mandoc/test-strsep.c (revision 8df8b2d3e51d1b816201d8a1fe8bc29fe192e562)
1 #include <string.h>
2 
3 int
4 main(void)
5 {
6 	char buf[6] = "aybxc";
7 	char *workp = buf;
8 	char *retp = strsep(&workp, "xy");
9 	return ! (retp == buf && buf[1] == '\0' && workp == buf + 2);
10 }
11