freebsd-dev/contrib/mandoc/test-strsep.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
183 B
C
Raw Normal View History

2014-11-22 18:08:25 +00:00
#include <string.h>
int
main(void)
{
char buf[6] = "aybxc";
char *workp = buf;
char *retp = strsep(&workp, "xy");
2016-01-15 23:08:59 +00:00
return ! (retp == buf && buf[1] == '\0' && workp == buf + 2);
2014-11-22 18:08:25 +00:00
}