added license for sysdeps/ieee754/flt-32/e_gammaf_r.c
[glibc.git] / stdio-common / bug6.c
blob50098bf3f2d9a0b9014ab82a622914fb8db0fa5e
1 #include <stdio.h>
3 int
4 main (void)
6 char buf[80];
7 int i;
8 int lost = 0;
10 lost = (scanf ("%2s", buf) < 0);
11 lost |= (buf[0] != 'X' || buf[1] != 'Y' || buf[2] != '\0');
12 if (lost)
13 puts ("test of %2s failed.");
14 lost |= (scanf (" ") < 0);
15 lost |= (scanf ("%d", &i) < 0);
16 lost |= (i != 1234);
17 if (lost)
18 puts ("test of %d failed.");
19 lost |= (scanf ("%c", buf) < 0);
20 lost |= (buf[0] != 'L');
21 if (lost)
22 puts ("test of %c failed.\n");
24 puts (lost ? "Test FAILED!" : "Test succeeded.");
25 return lost;