From dfda0cb34b738e8d555c93e3f4f316a2594a9d25 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 4 Jan 2014 01:11:00 +0000 Subject: 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. --- test-strlcat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test-strlcat.c') 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 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])); } -- cgit