fpurge: Sharper test.
authorBruno Haible <bruno@clisp.org>
Sat, 1 May 2010 18:42:16 +0000 (20:42 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 1 May 2010 18:43:20 +0000 (20:43 +0200)
ChangeLog
modules/fpurge-tests
tests/test-fpurge.c

index b234431..03c90ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-05-01  Bruno Haible  <bruno@clisp.org>
 
+       fpurge: Sharper test.
+       * tests/test-fpurge.c (main): Add one more ftell check.
+       * modules/fpurge-tests (Depends-on): Add ftell.
+       Suggested by Eric Blake.
+
+2010-05-01  Bruno Haible  <bruno@clisp.org>
+
        ftello: Another test.
        * tests/test-ftello3.c: New file.
        * modules/ftello-tests (Files): Add it.
index 74e898d..59c6e7d 100644 (file)
@@ -4,6 +4,7 @@ tests/macros.h
 
 Depends-on:
 fflush
+ftell
 
 configure.ac:
 
index 89fe8c0..770583f 100644 (file)
@@ -108,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)