summaryrefslogtreecommitdiffstats
path: root/contrib/mdocml/test-strlcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/mdocml/test-strlcpy.c')
-rw-r--r--contrib/mdocml/test-strlcpy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/mdocml/test-strlcpy.c b/contrib/mdocml/test-strlcpy.c
new file mode 100644
index 0000000..05fa509
--- /dev/null
+++ b/contrib/mdocml/test-strlcpy.c
@@ -0,0 +1,9 @@
+#include <string.h>
+
+int
+main(void)
+{
+ char buf[2] = "";
+ return( ! (1 == strlcpy(buf, "a", sizeof(buf)) &&
+ 'a' == buf[0] && '\0' == buf[1]));
+}
OpenPOWER on IntegriCloud