5 /* strcat( char *, const char * )
7 This file is part of the Public Domain C Library (PDCLib).
8 Permission is granted to use, modify, and / or redistribute at will.
15 char * strcat( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
22 while ( (*s1++ = *s2++) );
29 #include <_PDCLIB_test.h>
33 char s[] = "xx\0xxxxxx";
35 TESTCASE( strcat( s, abcde ) == s );
36 TESTCASE( s[2] == 'a' );
37 TESTCASE( s[6] == 'e' );
38 TESTCASE( s[7] == '\0' );
39 TESTCASE( s[8] == 'x' );
41 TESTCASE( strcat( s, abcdx ) == s );
42 TESTCASE( s[4] == 'x' );
43 TESTCASE( s[5] == '\0' );
44 TESTCASE( strcat( s, "\0" ) == s );
45 TESTCASE( s[5] == '\0' );
46 TESTCASE( s[6] == 'e' );