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