1 /* Test for fdopen bugs. */
11 fputs ("test failed: " #x "\n", stderr); \
19 main (int argc, char *argv[])
27 fp = fopen (name, "w");
29 fputs ("foobar and baz", fp);
33 fd = open (name, O_RDONLY);
35 assert (lseek (fd, 5, SEEK_SET) == 5);
36 /* The file position indicator associated with the new stream is set to
37 the position indicated by the file offset associated with the file
39 fp = fdopen (fd, "r");
41 assert (getc (fp) == 'r');
42 assert (getc (fp) == ' ');