4 #include <support/support.h>
10 char obuf
[99999], ibuf
[sizeof obuf
];
20 if (fputs ("line\n", f
) == EOF
)
26 memset (obuf
, 'z', sizeof obuf
);
27 memset (ibuf
, 'y', sizeof ibuf
);
29 if (fwrite (obuf
, sizeof obuf
, 1, f
) != 1)
39 if (getline (&line
, &linesz
, f
) != 5)
44 if (strcmp (line
, "line\n"))
46 puts ("Lines differ. Test FAILED!");
50 if (fread (ibuf
, sizeof ibuf
, 1, f
) != 1)
56 if (memcmp (ibuf
, obuf
, sizeof ibuf
))
58 puts ("Buffers differ. Test FAILED!");
63 GDB is free software and you are welcome to distribute copies of it\n\
64 under certain conditions; type \"show copying\" to see the conditions.\n\
65 There is absolutely no warranty for GDB; type \"show warranty\" for details.\n\
68 puts ("Test succeeded.");
72 #define TEST_FUNCTION do_test ()
73 #include "../test-skeleton.c"