summaryrefslogtreecommitdiff
path: root/t/io/read.t
blob: b27fde17c7ba01d19808dd029ca6f34741c28c2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!./perl

# $RCSfile$

print "1..1\n";

open(A,"+>a");
print A "_";
seek(A,0,0);

$b = "abcd"; 
$b = "";

read(A,$b,1,4);

close(A);

unlink("a");

if ($b eq "\000\000\000\000_") {
	print "ok 1\n";
} else { # Probably "\000bcd_"
	print "not ok 1\n";
}

unlink 'a';