1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-05 19:35:52 +03:00
Files
glibc/libio/tst-fflush.c
Frédéric Bérat 11e188659d libio: Add test case for fflush
Since one path uses _IO_SYNC and the other _IO_OVERFLOW, the newly added
test cases verifies that `fflush (FILE)` and `fflush (NULL)` are
semantically equivalent from the FILE perspective.

Reviewed-by: Joseph Myers <josmyers@redhat.com>
2025-04-14 13:27:12 +02:00

25 lines
985 B
C

/* Test that fflush (FILE) and fflush (NULL) are semantically equivalent.
This is the `fflush (FILE)` part.
Copyright (C) 2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#define FILE_FLUSH_TYPE 1
#define S_FLUSH_TYPE "FILE"
#include "tst-fflush-skeleton.c"