Sun Nov 26 12:44:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
[glibc.git] / stdio-common / bug6.c
blob4a37ab2584e577b3aa7a37329a2722aff10a813e
1 #include <ansidecl.h>
2 #include <stdio.h>
4 int
5 DEFUN_VOID(main)
7 char buf[80];
8 int i;
9 int lost = 0;
11 scanf ("%2s", buf);
12 lost |= (buf[0] != 'X' || buf[1] != 'Y' || buf[2] != '\0');
13 if (lost)
14 puts ("test of %2s failed.");
15 scanf (" ");
16 scanf ("%d", &i);
17 lost |= (i != 1234);
18 if (lost)
19 puts ("test of %d failed.");
20 scanf ("%c", buf);
21 lost |= (buf[0] != 'L');
22 if (lost)
23 puts ("test of %c failed.\n");
25 puts (lost ? "Test FAILED!" : "Test succeeded.");
26 return lost;