summaryrefslogtreecommitdiff
path: root/t/io
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-09-03 01:53:21 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-09-03 01:53:21 +0000
commit93c1eb4fb43cf276851ff0a3e758384d1a1d5850 (patch)
treefc5e11bd4e76ed14ea7947f6ecc807c5cdb7b89a /t/io
parentd1bf51ddeaafef1b94a1f5c011bdefbb8ebf5604 (diff)
downloadperl-93c1eb4fb43cf276851ff0a3e758384d1a1d5850.tar.gz
perl 5.003_05: t/io/read.t
Clear any buffer space exposed by by read(). This is almost certainly a bug-fix.
Diffstat (limited to 't/io')
-rw-r--r--t/io/read.t22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/io/read.t b/t/io/read.t
new file mode 100644
index 0000000000..16d32b189c
--- /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";
+}