]> gitweb.factorcode.org Git - factor.git/blob - basis/io/pipes/unix/pipes-tests.factor
7d5a660e6fa0d700d936f1c141eb5560d9f198fd
[factor.git] / basis / io / pipes / unix / pipes-tests.factor
1 USING: tools.test io.pipes io.pipes.unix io.encodings.utf8
2 io.encodings io namespaces sequences ;
3
4 [ { 0 0 } ] [ { "ls" "grep ." } run-pipeline ] unit-test
5
6 [ { 0 f 0 } ] [
7     {
8         "ls"
9         [
10             input-stream [ utf8 <decoder> ] change
11             output-stream [ utf8 <encoder> ] change
12             input-stream get lines reverse [ print ] each f
13         ]
14         "grep ."
15     } run-pipeline
16 ] unit-test