X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Frename.c;fp=functions%2Fstdio%2Frename.c;h=987b78a5906cb6f1b259468953beac60f2ff126c;hb=eb5ed9b72fcfde2f2f05a9140723a25ddf0c5f1b;hp=6b1e1b592f23bff2f62f2a6150c7e5c211cae75f;hpb=d2d5fb69f50cddf5a00eed17d35f8dc03c2431e8;p=pdclib diff --git a/functions/stdio/rename.c b/functions/stdio/rename.c index 6b1e1b5..987b78a 100644 --- a/functions/stdio/rename.c +++ b/functions/stdio/rename.c @@ -46,7 +46,7 @@ int main( void ) TESTCASE( fopen( testfile1, "r" ) == NULL ); TESTCASE( fopen( testfile2, "r" ) == NULL ); /* rename file 1 to file 2 - expected to fail */ - TESTCASE( rename( testfile1, testfile2 ) == -1 ); + TESTCASE( rename( testfile1, testfile2 ) != 0 ); /* create file 1 */ TESTCASE( ( file = fopen( testfile1, "w" ) ) != NULL ); TESTCASE( fputs( "x", file ) != EOF ); @@ -71,7 +71,7 @@ int main( void ) _PDCLIB_rename() itself. */ /* NOREG as glibc overwrites existing destination file. */ - TESTCASE_NOREG( rename( testfile1, testfile2 ) == -1 ); + TESTCASE_NOREG( rename( testfile1, testfile2 ) != 0 ); /* remove both files */ TESTCASE( remove( testfile1 ) == 0 ); TESTCASE( remove( testfile2 ) == 0 );