io.launcher.unix: fix tests to use arch in file names.

db4
John Benediktsson 2012-09-22 10:30:10 -07:00
parent ea276574c5
commit adb3a15d21
1 changed files with 24 additions and 21 deletions

View File

@ -1,65 +1,68 @@
USING: accessors arrays bootstrap.image calendar
concurrency.promises continuations debugger.unix destructors io
io.backend.unix io.directories io.encodings.ascii
io.encodings.binary io.encodings.utf8 io.files io.files.temp
io.launcher io.launcher.unix io.pathnames io.streams.duplex
io.timeouts kernel locals math namespaces sequences threads
tools.test unix unix.process ;
IN: io.launcher.unix.tests IN: io.launcher.unix.tests
USING: io.backend.unix io.files io.files.temp io.directories
io.pathnames tools.test io.launcher arrays io namespaces : arch-temp-file ( str -- str' )
continuations math io.encodings.binary io.encodings.ascii "-" my-arch 3append temp-file ;
accessors kernel sequences io.encodings.utf8 destructors
io.streams.duplex locals concurrency.promises threads
unix.process calendar unix debugger.unix io.timeouts
io.launcher.unix ;
[ ] [ [ ] [
[ "launcher-test-1" temp-file delete-file ] ignore-errors [ "launcher-test-1" arch-temp-file delete-file ] ignore-errors
] unit-test ] unit-test
[ ] [ [ ] [
"touch" "touch"
"launcher-test-1" temp-file "launcher-test-1" arch-temp-file
2array 2array
try-process try-process
] unit-test ] unit-test
[ t ] [ "launcher-test-1" temp-file exists? ] unit-test [ t ] [ "launcher-test-1" arch-temp-file exists? ] unit-test
[ ] [ [ ] [
[ "launcher-test-1" temp-file delete-file ] ignore-errors [ "launcher-test-1" arch-temp-file delete-file ] ignore-errors
] unit-test ] unit-test
[ ] [ [ ] [
<process> <process>
"echo Hello" >>command "echo Hello" >>command
"launcher-test-1" temp-file >>stdout "launcher-test-1" arch-temp-file >>stdout
try-process try-process
] unit-test ] unit-test
[ "Hello\n" ] [ [ "Hello\n" ] [
"cat" "cat"
"launcher-test-1" temp-file "launcher-test-1" arch-temp-file
2array 2array
ascii <process-reader> stream-contents ascii <process-reader> stream-contents
] unit-test ] unit-test
[ ] [ [ ] [
[ "launcher-test-1" temp-file delete-file ] ignore-errors [ "launcher-test-1" arch-temp-file delete-file ] ignore-errors
] unit-test ] unit-test
[ ] [ [ ] [
<process> <process>
"cat" >>command "cat" >>command
+closed+ >>stdin +closed+ >>stdin
"launcher-test-1" temp-file >>stdout "launcher-test-1" arch-temp-file >>stdout
try-process try-process
] unit-test ] unit-test
[ "" ] [ [ "" ] [
"cat" "cat"
"launcher-test-1" temp-file "launcher-test-1" arch-temp-file
2array 2array
ascii <process-reader> stream-contents ascii <process-reader> stream-contents
] unit-test ] unit-test
[ ] [ [ ] [
2 [ 2 [
"launcher-test-1" temp-file binary <file-appender> [ "launcher-test-1" arch-temp-file binary <file-appender> [
<process> <process>
swap >>stdout swap >>stdout
"echo Hello" >>command "echo Hello" >>command
@ -70,7 +73,7 @@ io.launcher.unix ;
[ "Hello\nHello\n" ] [ [ "Hello\nHello\n" ] [
"cat" "cat"
"launcher-test-1" temp-file "launcher-test-1" arch-temp-file
2array 2array
ascii <process-reader> stream-contents ascii <process-reader> stream-contents
] unit-test ] unit-test
@ -103,16 +106,16 @@ io.launcher.unix ;
utf8 file-contents utf8 file-contents
] unit-test ] unit-test
[ "append-test" temp-file delete-file ] ignore-errors [ "append-test" arch-temp-file delete-file ] ignore-errors
[ "hi\nhi\n" ] [ [ "hi\nhi\n" ] [
2 [ 2 [
<process> <process>
"echo hi" >>command "echo hi" >>command
"append-test" temp-file <appender> >>stdout "append-test" arch-temp-file <appender> >>stdout
try-process try-process
] times ] times
"append-test" temp-file utf8 file-contents "append-test" arch-temp-file utf8 file-contents
] unit-test ] unit-test
[ t ] [ "ls" utf8 <process-stream> stream-contents >boolean ] unit-test [ t ] [ "ls" utf8 <process-stream> stream-contents >boolean ] unit-test