3 /* puts( 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 int puts( const char * s )
20 if (putchar('\n') != '\n')
28 #include <_PDCLIB_test.h>
33 char const * message = "SUCCESS testing puts()";
36 TESTCASE( ( fh = freopen( testfile, "wb+", stdout ) ) != NULL );
37 TESTCASE( puts( message ) >= 0 );
39 TESTCASE( fread( buffer, 1, 22, fh ) == 22 );
40 TESTCASE( memcmp( buffer, message, 22 ) == 0 );
41 TESTCASE( buffer[22] == 'x' );
42 TESTCASE( fclose( fh ) == 0 );
43 TESTCASE( remove( testfile ) == 0 );