flush
[m6w6/ext-psi] / tests / pipe / pipe001.phpt
diff --git a/tests/pipe/pipe001.phpt b/tests/pipe/pipe001.phpt
new file mode 100644 (file)
index 0000000..a6461c4
--- /dev/null
@@ -0,0 +1,27 @@
+--TEST--
+pipe
+--SKIPIF--
+<?php
+extension_loaded("psi") or die("skip - need ext/psi");
+?>
+--INI--
+psi.directory={PWD}
+--FILE--
+===TEST===
+<?php 
+
+var_dump(pipe($pipes));
+$r = fopen("php://fd/".$pipes[0], "r");
+$w = fopen("php://fd/".$pipes[1], "w");
+
+fputs($w, "Hello World!\n");
+var_dump(fgets($r));
+
+?>
+===DONE===
+--EXPECT--
+===TEST===
+int(0)
+string(13) "Hello World!
+"
+===DONE===
\ No newline at end of file