From: Perl 5 Porters Date: Tue, 3 Sep 1996 01:53:21 +0000 (+0000) Subject: perl 5.003_05: t/io/read.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=93c1eb4fb43cf276851ff0a3e758384d1a1d5850;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_05: t/io/read.t Clear any buffer space exposed by by read(). This is almost certainly a bug-fix. --- diff --git a/t/io/read.t b/t/io/read.t new file mode 100644 index 0000000..16d32b1 --- /dev/null +++ b/t/io/read.t @@ -0,0 +1,22 @@ +#!./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); + +if ($b eq "\000\000\000\000_") { + print "ok 1\n"; +} else { # Probably "\000bcd_" + print "not ok 1\n"; +}