annotate tests/test-fflush2.sh @ 14730:f0a9a2cd267c

fclose: preserve fflush errors Caught by gcc -Werror=unused-but-set-variable. * lib/fclose.c (rpl_fclose): Don't lose fflush errors. Reported by Jim Meyering. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Wed, 11 May 2011 11:35:06 -0600
parents 1b3e52ed017e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9772
cfd020716bf2 Make fflush after ungetc work on BSD platforms.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 #!/bin/sh
cfd020716bf2 Make fflush after ungetc work on BSD platforms.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
cfd020716bf2 Make fflush after ungetc work on BSD platforms.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 # Execute the test only with seekable input stream.
cfd020716bf2 Make fflush after ungetc work on BSD platforms.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 # The behaviour of fflush() on a non-seekable input stream is undefined.
11015
1b3e52ed017e Enable tests for fflush after ungetc.
Bruno Haible <bruno@clisp.org>
parents: 9772
diff changeset
5 ./test-fflush2${EXEEXT} 1 < "$srcdir/test-fflush2.sh" || exit $?
1b3e52ed017e Enable tests for fflush after ungetc.
Bruno Haible <bruno@clisp.org>
parents: 9772
diff changeset
6 ./test-fflush2${EXEEXT} 2 < "$srcdir/test-fflush2.sh" || exit $?
9772
cfd020716bf2 Make fflush after ungetc work on BSD platforms.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 #cat "$srcdir/test-fflush2.sh" | ./test-fflush2${EXEEXT} || exit $?
cfd020716bf2 Make fflush after ungetc work on BSD platforms.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
cfd020716bf2 Make fflush after ungetc work on BSD platforms.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 exit 0