diff options
Diffstat (limited to 'tests/unistd/io.c')
-rw-r--r-- | tests/unistd/io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unistd/io.c b/tests/unistd/io.c index 0ff5f4fb..6bf22593 100644 --- a/tests/unistd/io.c +++ b/tests/unistd/io.c @@ -104,6 +104,12 @@ int main() { printf("errno: %d\n\n", errno); errno = 0; + printf("pread past end of file: %d\n", pread(f, readBuffer, sizeof readBuffer, 99999999999)); + printf("data: %s\n", readBuffer); + memset(readBuffer, 0, sizeof readBuffer); + printf("errno: %d\n\n", errno); + errno = 0; + printf("seek: %d\n", lseek(f, 3, SEEK_SET)); printf("errno: %d\n\n", errno); printf("partial read from file: %d\n", read(f, readBuffer, 3)); |