From: solar Date: Thu, 6 Jul 2006 08:49:09 +0000 (+0000) Subject: Fixed regression tests. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=51f4e95bb55d2e59a9332a6e168d52f6eeb29e43;p=fw%2Fpdclib Fixed regression tests. git-svn-id: https://srv7.svn-repos.de/dev34/pdclib/trunk@246 546481bc-9713-0410-bf18-d3337bbf4a3e --- diff --git a/functions/stdio/fopen.c b/functions/stdio/fopen.c index 14ce3a8..e153383 100644 --- a/functions/stdio/fopen.c +++ b/functions/stdio/fopen.c @@ -53,13 +53,23 @@ fail: int main( void ) { + /* Some of the tests are not executed for regression tests, as the libc on + my system is at once less forgiving (segfaults on mode NULL) and more + forgiving (accepts undefined modes). + */ +#ifndef REGTEST TESTCASE( fopen( NULL, NULL ) == NULL ); +#endif TESTCASE( fopen( NULL, "w" ) == NULL ); +#ifndef REGTEST TESTCASE( fopen( "", NULL ) == NULL ); +#endif TESTCASE( fopen( "", "w" ) == NULL ); TESTCASE( fopen( "foo", "" ) == NULL ); - TESTCASE( fopen( "testfile", "wq" ) == NULL ); /* Illegal mode */ - TESTCASE( fopen( "testfile", "wr" ) == NULL ); /* Illegal mode */ +#ifndef REGTEST + TESTCASE( fopen( "testfile", "wq" ) == NULL ); /* Undefined mode */ + TESTCASE( fopen( "testfile", "wr" ) == NULL ); /* Undefined mode */ +#endif TESTCASE( fopen( "testfile", "w" ) != NULL ); system( "rm testfile" ); return TEST_RESULTS;