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.
11 #include <_PDCLIB_aux.h>
13 char * strcat( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
20 while ( (*s1++ = *s2++) );
25 #include <_PDCLIB_test.h>
29 char s[] = "xx\0xxxxxx";
31 TESTCASE( strcat( s, abcde ) == s );
32 TESTCASE( s[2] == 'a' );
33 TESTCASE( s[6] == 'e' );
34 TESTCASE( s[7] == '\0' );
35 TESTCASE( s[8] == 'x' );
37 TESTCASE( strcat( s, abcdx ) == s );
38 TESTCASE( s[4] == 'x' );
39 TESTCASE( s[5] == '\0' );
40 TESTCASE( strcat( s, "\0" ) == s );
41 TESTCASE( s[5] == '\0' );
42 TESTCASE( s[6] == 'e' );