X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-fpurge.c;h=0f362217b4ca3041e35d3d1f98b8cb470de19c76;hb=645581732c2d8066282b32d686edd67e18c52ee2;hp=9bf23788681559badecd526f2dba049dd0aa1d8c;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/tests/test-fpurge.c b/tests/test-fpurge.c index 9bf237886..0f362217b 100644 --- a/tests/test-fpurge.c +++ b/tests/test-fpurge.c @@ -1,5 +1,5 @@ /* Test of fpurge() function. - Copyright (C) 2007-2009 Free Software Foundation, Inc. + Copyright (C) 2007-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,28 +18,14 @@ #include +/* None of the files accessed by this test are large, so disable the + fseek link warning if we are not using the gnulib fseek module. */ +#define _GL_NO_LARGE_FILES #include -#include #include -/* None of the files accessed by this test are large, so disable the - fseek link warning if we are not using the gnulib fseek module. */ -#if !GNULIB_FSEEK -# undef fseek -#endif - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" #define TESTFILE "t-fpurge.tmp" @@ -122,6 +108,8 @@ main (void) if (check_filepos) ASSERT (ftell (fp) == 8); ASSERT (putc ('!', fp) == '!'); + if (check_filepos) + ASSERT (ftell (fp) == 9); ASSERT (fclose (fp) == 0); fp = fopen (TESTFILE, "r"); if (fp == NULL)