[BACK]Return to test-strlcpy.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

File: [cvsweb.bsd.lv] / mandoc / test-strlcpy.c (download)

Revision 1.2, Sat Jan 4 01:11:00 2014 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3, VERSION_1_13_2, VERSION_1_13_1, VERSION_1_12_4, VERSION_1_12
Changes since 1.1: +4 -3 lines

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.

#include <string.h>

int
main(void)
{
	char buf[2] = "";
	return( ! (1 == strlcpy(buf, "a", sizeof(buf)) &&
	    'a' == buf[0] && '\0' == buf[1]));
}