diff options
Diffstat (limited to 't/op.read')
-rw-r--r-- | t/op.read | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/op.read b/t/op.read new file mode 100644 index 0000000000..b219917a68 --- /dev/null +++ b/t/op.read @@ -0,0 +1,19 @@ +#!./perl + +# $Header: op.read,v 3.0 89/10/18 15:30:58 lwall Locked $ + +print "1..4\n"; + + +open(FOO,'op.read') || open(FOO,'t/op.read') || die "Can't open op.read"; +seek(FOO,4,0); +$got = read(FOO,$buf,4); + +print ($got == 4 ? "ok 1\n" : "not ok 1\n"); +print ($buf eq "perl" ? "ok 2\n" : "not ok 2 :$buf:\n"); + +seek(FOO,20000,0); +$got = read(FOO,$buf,4); + +print ($got == 0 ? "ok 3\n" : "not ok 3\n"); +print ($buf eq "" ? "ok 4\n" : "not ok 4\n"); |