test: Move and activate fpurge() test case from module to a dedicated file

This commit is contained in:
Guillem Jover
2014-11-01 00:54:09 +01:00
parent 205827a2dd
commit cfb4d462a9
4 changed files with 47 additions and 20 deletions

View File

@@ -44,23 +44,3 @@ fpurge(FILE *fp)
#else
#error "Function fpurge() needs to be ported."
#endif
#ifdef TEST
int
main()
{
static FILE fp_bad;
FILE *fp;
if (fpurge(&fp_bad) == 0)
return 1;
fp = fopen("/dev/zero", "r");
if (fpurge(fp) < 0)
return 1;
fclose(fp);
return 0;
}
#endif