summaryrefslogtreecommitdiff
path: root/t/io/read.t
diff options
context:
space:
mode:
Diffstat (limited to 't/io/read.t')
-rwxr-xr-xt/io/read.t26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/io/read.t b/t/io/read.t
new file mode 100755
index 0000000000..b27fde17c7
--- /dev/null
+++ b/t/io/read.t
@@ -0,0 +1,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';