1 IN: io.unix.launcher.tests
2 USING: io.files tools.test io.launcher arrays io namespaces
3 continuations math io.encodings.binary io.encodings.ascii
4 accessors kernel sequences ;
7 [ "launcher-test-1" temp-file delete-file ] ignore-errors
12 "launcher-test-1" temp-file
17 [ t ] [ "launcher-test-1" temp-file exists? ] unit-test
20 [ "launcher-test-1" temp-file delete-file ] ignore-errors
25 "echo Hello" >>command
26 "launcher-test-1" temp-file >>stdout
32 "launcher-test-1" temp-file
34 ascii <process-stream> contents
40 "launcher-test-1" temp-file
43 ascii <process-stream> contents
47 [ "launcher-test-1" temp-file delete-file ] ignore-errors
54 "launcher-test-1" temp-file >>stdout
60 "launcher-test-1" temp-file
62 ascii <process-stream> contents
67 "launcher-test-1" temp-file binary <file-appender> [
70 "echo Hello" >>command
76 [ "Hello\nHello\n" ] [
78 "launcher-test-1" temp-file
80 ascii <process-stream> contents
86 { { "A" "B" } } >>environment
87 ascii <process-stream> lines
94 { { "A" "B" } } >>environment
95 +replace-environment+ >>environment-mode
96 ascii <process-stream> lines