summaryrefslogtreecommitdiffstats
path: root/test-strlcpy.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-04 01:11:00 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-04 01:11:00 +0000
commitdfda0cb34b738e8d555c93e3f4f316a2594a9d25 (patch)
tree4f295e79675d1c9d62354c0c23719c00b77183f1 /test-strlcpy.c
parentc17325b87a0a99d79e776e4c805dc22ae21cef67 (diff)
downloadmandoc-dfda0cb34b738e8d555c93e3f4f316a2594a9d25.tar.gz
Clean up feature tests:
* Split the configure steering script out of the Makefile. * Let the configure step depend on the test sources. * Clean up the test programs such that they can be run.
Diffstat (limited to 'test-strlcpy.c')
-rw-r--r--test-strlcpy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test-strlcpy.c b/test-strlcpy.c
index c7d182aa..05fa5094 100644
--- a/test-strlcpy.c
+++ b/test-strlcpy.c
@@ -1,8 +1,9 @@
#include <string.h>
int
-main(int argc, char **argv)
+main(void)
{
- strlcpy(argv[0], argv[1], 10);
- return 0;
+ char buf[2] = "";
+ return( ! (1 == strlcpy(buf, "a", sizeof(buf)) &&
+ 'a' == buf[0] && '\0' == buf[1]));
}