factor/basis/io/pipes/unix/pipes-tests.factor

18 lines
447 B
Factor
Raw Normal View History

USING: tools.test io.pipes io.pipes.unix io.encodings.utf8
2008-05-05 20:12:22 -04:00
io.encodings io namespaces sequences ;
IN: io.pipes.unix.tests
2008-05-05 04:15:24 -04:00
2008-06-27 21:15:38 -04:00
[ { 0 0 } ] [ { "ls" "grep ." } run-pipeline ] unit-test
2008-05-05 04:15:24 -04:00
2008-05-05 04:51:41 -04:00
[ { 0 f 0 } ] [
{
"ls"
[
input-stream [ utf8 <decoder> ] change
output-stream [ utf8 <encoder> ] change
2008-05-05 04:51:41 -04:00
input-stream get lines reverse [ print ] each f
]
2008-06-27 21:15:38 -04:00
"grep ."
2008-05-05 20:12:22 -04:00
} run-pipeline
2008-05-05 04:51:41 -04:00
] unit-test