1 /* Check that basic (ll|f)seek sim functionality works. Also uses basic
2 file open/write functionality. */
11 const char fname[] = "sk1test.dat";
13 = "A random line of text, used to test correct read, write and seek.\n";
14 char buf[sizeof tsttxt] = "";
16 f = fopen (fname, "w");
18 || fwrite (tsttxt, 1, strlen (tsttxt), f) != strlen (tsttxt)
25 /* Using "rb" to make this test similar to the use in genconf.c in
27 f = fopen (fname, "rb");
29 || fseek (f, 0L, SEEK_END) != 0
30 || ftell (f) != strlen (tsttxt))
37 if (fread (buf, 1, strlen (tsttxt), f) != strlen (tsttxt)
38 || strcmp (buf, tsttxt) != 0