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