summaryrefslogtreecommitdiffstats
path: root/test-strsep.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-31 23:03:47 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-31 23:03:47 +0000
commit00a83eb67618ef2d3d4efc692882efa3dc6252ca (patch)
tree59a7e5c44227c8d33e82baad01e4a6bcf77e7777 /test-strsep.c
parentbe3cd034f5ca97ad2872d535487f43449fb84e8c (diff)
downloadmandoc-00a83eb67618ef2d3d4efc692882efa3dc6252ca.tar.gz
Provide strcasestr(3) and strsep(3) for Solaris 10 compat;
reported missing by Matthias Scheler <tron at NetBSD> via wiz@.
Diffstat (limited to 'test-strsep.c')
-rw-r--r--test-strsep.c10
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));
+}