This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test case for C<undef %File::Glob::>
[perl5.git] / t / op / read.t
CommitLineData
a687059c
LW
1#!./perl
2
79072805 3# $RCSfile: read.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:17 $
a687059c
LW
4
5print "1..4\n";
6
7
fe14fcc3 8open(FOO,'op/read.t') || open(FOO,'t/op/read.t') || die "Can't open op.read";
a687059c
LW
9seek(FOO,4,0);
10$got = read(FOO,$buf,4);
11
12print ($got == 4 ? "ok 1\n" : "not ok 1\n");
13print ($buf eq "perl" ? "ok 2\n" : "not ok 2 :$buf:\n");
14
a0d0e21e 15seek (FOO,0,2) || seek(FOO,20000,0);
a687059c
LW
16$got = read(FOO,$buf,4);
17
18print ($got == 0 ? "ok 3\n" : "not ok 3\n");
19print ($buf eq "" ? "ok 4\n" : "not ok 4\n");