summaryrefslogtreecommitdiff
path: root/t/io.pipe
diff options
context:
space:
mode:
Diffstat (limited to 't/io.pipe')
-rw-r--r--t/io.pipe21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/io.pipe b/t/io.pipe
new file mode 100644
index 0000000000..c4cb2f7537
--- /dev/null
+++ b/t/io.pipe
@@ -0,0 +1,21 @@
+#!./perl
+
+# $Header: io.pipe,v 2.0 88/06/05 00:13:05 root Exp $
+
+$| = 1;
+print "1..4\n";
+
+open(PIPE, "|-") || (exec 'tr', '[A-Z]', '[a-z]');
+print PIPE "OK 1\n";
+print PIPE "ok 2\n";
+close PIPE;
+
+if (open(PIPE, "-|")) {
+ while(<PIPE>) {
+ print;
+ }
+}
+else {
+ print stdout "ok 3\n";
+ exec 'echo', 'ok 4';
+}