]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/io/pipes/unix/unix-tests.factor
factor: qualifying blank?, random fixes, renamed test file
[factor.git] / basis / io / pipes / unix / unix-tests.factor
diff --git a/basis/io/pipes/unix/unix-tests.factor b/basis/io/pipes/unix/unix-tests.factor
new file mode 100644 (file)
index 0000000..b0d1f36
--- /dev/null
@@ -0,0 +1,16 @@
+USING: tools.test io.pipes io.pipes.unix io.encodings.utf8
+io.encodings io namespaces sequences splitting ;
+
+[ { 0 0 } ] [ { "ls" "grep ." } run-pipeline ] unit-test
+
+[ { 0 f 0 } ] [
+    {
+        "ls"
+        [
+            input-stream [ utf8 <decoder> ] change
+            output-stream [ utf8 <encoder> ] change
+            input-stream get stream-contents split-lines reverse [ print ] each f
+        ]
+        "grep ."
+    } run-pipeline
+] unit-test