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