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