xref: /freebsd/contrib/mandoc/test-strlcpy.c (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1 #include <string.h>
2 
3 int
4 main(void)
5 {
6 	char buf[2] = "";
7 	return ! (strlcpy(buf, "a", sizeof(buf)) == 1 &&
8 	    buf[0] == 'a' && buf[1] == '\0');
9 }
10