Commit | Line | Data |
a687059c |
1 | #!./perl |
2 | |
fe14fcc3 |
3 | # $Header: read.t,v 4.0 91/03/20 01:54:16 lwall Locked $ |
a687059c |
4 | |
5 | print "1..4\n"; |
6 | |
7 | |
fe14fcc3 |
8 | open(FOO,'op/read.t') || open(FOO,'t/op/read.t') || die "Can't open op.read"; |
a687059c |
9 | seek(FOO,4,0); |
10 | $got = read(FOO,$buf,4); |
11 | |
12 | print ($got == 4 ? "ok 1\n" : "not ok 1\n"); |
13 | print ($buf eq "perl" ? "ok 2\n" : "not ok 2 :$buf:\n"); |
14 | |
15 | seek(FOO,20000,0); |
16 | $got = read(FOO,$buf,4); |
17 | |
18 | print ($got == 0 ? "ok 3\n" : "not ok 3\n"); |
19 | print ($buf eq "" ? "ok 4\n" : "not ok 4\n"); |