aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-strlcat.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
commit6d55934c65607a0db77403b6b364af25e7ae1a70 (patch)
treee8de91439269693965fab1cfabe18975512e7763 /test-strlcat.c
parent25d3bfdfd1b1a2da2d820f6bbb0406ef7dd2466c (diff)
downloadmandoc-6d55934c65607a0db77403b6b364af25e7ae1a70.tar.gz
mandoc-6d55934c65607a0db77403b6b364af25e7ae1a70.tar.zst
mandoc-6d55934c65607a0db77403b6b364af25e7ae1a70.zip
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-strlcat.c')
-rw-r--r--test-strlcat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test-strlcat.c b/test-strlcat.c
index 5d450dd0..b74ce6f4 100644
--- a/test-strlcat.c
+++ b/test-strlcat.c
@@ -1,8 +1,9 @@
#include <string.h>
int
-main(int argc, char **argv)
+main(void)
{
- strlcat(argv[0], argv[1], 10);
- return 0;
+ char buf[3] = "a";
+ return( ! (2 == strlcat(buf, "b", sizeof(buf)) &&
+ 'a' == buf[0] && 'b' == buf[1] && '\0' == buf[2]));
}