This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.003_05: t/io/read.t
[perl5.git] / t / io / read.t
diff --git a/t/io/read.t b/t/io/read.t
new file mode 100644 (file)
index 0000000..16d32b1
--- /dev/null
@@ -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";
+}