summaryrefslogtreecommitdiff
path: root/lib/t-fpending.c
blob: 10335cdd037d284c76184168033d9322777fa054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Ensure that __fpending works.  */

#include <config.h>
#include <stdio.h>
#include <stdlib.h>

#include "__fpending.h"

int
main ()
{
  if (__fpending (stdout) != 0)
    abort ();

  fputs ("foo", stdout);
  if (__fpending (stdout) != 3)
    abort ();

  fflush (stdout);
  if (__fpending (stdout) != 0)
    abort ();

  exit (0);
}