diff options
Diffstat (limited to 'test-strsep.c')
-rw-r--r-- | test-strsep.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test-strsep.c b/test-strsep.c new file mode 100644 index 00000000..4c57c13e --- /dev/null +++ b/test-strsep.c @@ -0,0 +1,10 @@ +#include <string.h> + +int +main(void) +{ + char buf[6] = "aybxc"; + char *workp = buf; + char *retp = strsep(&workp, "xy"); + return( ! (retp == buf && '\0' == buf[1] && buf + 2 == workp)); +} |