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";
34 TESTCASE( strcat( s, abcde ) == s );
35 TESTCASE( s[2] == 'a' );
36 TESTCASE( s[6] == 'e' );
37 TESTCASE( s[7] == '\0' );
38 TESTCASE( s[8] == 'x' );
40 TESTCASE( strcat( s, abcdx ) == s );
41 TESTCASE( s[4] == 'x' );
42 TESTCASE( s[5] == '\0' );
43 TESTCASE( strcat( s, "\0" ) == s );
44 TESTCASE( s[5] == '\0' );
45 TESTCASE( s[6] == 'e' );