summaryrefslogblamecommitdiffstats
path: root/test-strsep.c
blob: 18bbb109a5b0acda918f0b25c40bad2093d323a7 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                          
                                                                     
 
#include <string.h>

int
main(void)
{
	char buf[6] = "aybxc";
	char *workp = buf;
	char *retp = strsep(&workp, "xy");
	return ! (retp == buf && buf[1] == '\0' && workp == buf + 2);
}