Tweak launcher test: it failed without cygwin
parent
d013967180
commit
1c33e993da
|
@ -1,157 +1,157 @@
|
||||||
USING: io.launcher tools.test calendar accessors environment
|
USING: io.launcher tools.test calendar accessors environment
|
||||||
namespaces kernel system arrays io io.files io.encodings.ascii
|
namespaces kernel system arrays io io.files io.encodings.ascii
|
||||||
sequences parser assocs hashtables math continuations eval ;
|
sequences parser assocs hashtables math continuations eval ;
|
||||||
IN: io.windows.launcher.nt.tests
|
IN: io.windows.launcher.nt.tests
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
<process>
|
<process>
|
||||||
"notepad" >>command
|
"notepad" >>command
|
||||||
1/2 seconds >>timeout
|
1/2 seconds >>timeout
|
||||||
"notepad" set
|
"notepad" set
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ f ] [ "notepad" get process-running? ] unit-test
|
[ f ] [ "notepad" get process-running? ] unit-test
|
||||||
|
|
||||||
[ f ] [ "notepad" get process-started? ] unit-test
|
[ f ] [ "notepad" get process-started? ] unit-test
|
||||||
|
|
||||||
[ ] [ "notepad" [ run-detached ] change ] unit-test
|
[ ] [ "notepad" [ run-detached ] change ] unit-test
|
||||||
|
|
||||||
[ "notepad" get wait-for-process ] must-fail
|
[ "notepad" get wait-for-process ] must-fail
|
||||||
|
|
||||||
[ t ] [ "notepad" get killed>> ] unit-test
|
[ t ] [ "notepad" get killed>> ] unit-test
|
||||||
|
|
||||||
[ f ] [ "notepad" get process-running? ] unit-test
|
[ f ] [ "notepad" get process-running? ] unit-test
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
<process>
|
<process>
|
||||||
vm "-quiet" "-run=hello-world" 3array >>command
|
vm "-quiet" "-run=hello-world" 3array >>command
|
||||||
"out.txt" temp-file >>stdout
|
"out.txt" temp-file >>stdout
|
||||||
try-process
|
try-process
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "Hello world" ] [
|
[ "Hello world" ] [
|
||||||
"out.txt" temp-file ascii file-lines first
|
"out.txt" temp-file ascii file-lines first
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
<process>
|
<process>
|
||||||
vm "-run=listener" 2array >>command
|
vm "-run=listener" 2array >>command
|
||||||
+closed+ >>stdin
|
+closed+ >>stdin
|
||||||
try-process
|
try-process
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
"resource:basis/io/windows/nt/launcher/test" [
|
"resource:basis/io/windows/nt/launcher/test" [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "stderr.factor" 3array >>command
|
vm "-script" "stderr.factor" 3array >>command
|
||||||
"out.txt" temp-file >>stdout
|
"out.txt" temp-file >>stdout
|
||||||
"err.txt" temp-file >>stderr
|
"err.txt" temp-file >>stderr
|
||||||
try-process
|
try-process
|
||||||
] with-directory
|
] with-directory
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "output" ] [
|
[ "output" ] [
|
||||||
"out.txt" temp-file ascii file-lines first
|
"out.txt" temp-file ascii file-lines first
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "error" ] [
|
[ "error" ] [
|
||||||
"err.txt" temp-file ascii file-lines first
|
"err.txt" temp-file ascii file-lines first
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
"resource:basis/io/windows/nt/launcher/test" [
|
"resource:basis/io/windows/nt/launcher/test" [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "stderr.factor" 3array >>command
|
vm "-script" "stderr.factor" 3array >>command
|
||||||
"out.txt" temp-file >>stdout
|
"out.txt" temp-file >>stdout
|
||||||
+stdout+ >>stderr
|
+stdout+ >>stderr
|
||||||
try-process
|
try-process
|
||||||
] with-directory
|
] with-directory
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "outputerror" ] [
|
[ "outputerror" ] [
|
||||||
"out.txt" temp-file ascii file-lines first
|
"out.txt" temp-file ascii file-lines first
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "output" ] [
|
[ "output" ] [
|
||||||
"resource:basis/io/windows/nt/launcher/test" [
|
"resource:basis/io/windows/nt/launcher/test" [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "stderr.factor" 3array >>command
|
vm "-script" "stderr.factor" 3array >>command
|
||||||
"err2.txt" temp-file >>stderr
|
"err2.txt" temp-file >>stderr
|
||||||
ascii <process-reader> lines first
|
ascii <process-reader> lines first
|
||||||
] with-directory
|
] with-directory
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "error" ] [
|
[ "error" ] [
|
||||||
"err2.txt" temp-file ascii file-lines first
|
"err2.txt" temp-file ascii file-lines first
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ t ] [
|
[ t ] [
|
||||||
"resource:basis/io/windows/nt/launcher/test" [
|
"resource:basis/io/windows/nt/launcher/test" [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "env.factor" 3array >>command
|
vm "-script" "env.factor" 3array >>command
|
||||||
ascii <process-reader> contents
|
ascii <process-reader> contents
|
||||||
] with-directory eval
|
] with-directory eval
|
||||||
|
|
||||||
os-envs =
|
os-envs =
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ t ] [
|
[ t ] [
|
||||||
"resource:basis/io/windows/nt/launcher/test" [
|
"resource:basis/io/windows/nt/launcher/test" [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "env.factor" 3array >>command
|
vm "-script" "env.factor" 3array >>command
|
||||||
+replace-environment+ >>environment-mode
|
+replace-environment+ >>environment-mode
|
||||||
os-envs >>environment
|
os-envs >>environment
|
||||||
ascii <process-reader> contents
|
ascii <process-reader> contents
|
||||||
] with-directory eval
|
] with-directory eval
|
||||||
|
|
||||||
os-envs =
|
os-envs =
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "B" ] [
|
[ "B" ] [
|
||||||
"resource:basis/io/windows/nt/launcher/test" [
|
"resource:basis/io/windows/nt/launcher/test" [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "env.factor" 3array >>command
|
vm "-script" "env.factor" 3array >>command
|
||||||
{ { "A" "B" } } >>environment
|
{ { "A" "B" } } >>environment
|
||||||
ascii <process-reader> contents
|
ascii <process-reader> contents
|
||||||
] with-directory eval
|
] with-directory eval
|
||||||
|
|
||||||
"A" swap at
|
"A" swap at
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ f ] [
|
[ f ] [
|
||||||
"resource:basis/io/windows/nt/launcher/test" [
|
"resource:basis/io/windows/nt/launcher/test" [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "env.factor" 3array >>command
|
vm "-script" "env.factor" 3array >>command
|
||||||
{ { "HOME" "XXX" } } >>environment
|
{ { "USERPROFILE" "XXX" } } >>environment
|
||||||
+prepend-environment+ >>environment-mode
|
+prepend-environment+ >>environment-mode
|
||||||
ascii <process-reader> contents
|
ascii <process-reader> contents
|
||||||
] with-directory eval
|
] with-directory eval
|
||||||
|
|
||||||
"HOME" swap at "XXX" =
|
"USERPROFILE" swap at "XXX" =
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
2 [
|
2 [
|
||||||
[ ] [
|
[ ] [
|
||||||
<process>
|
<process>
|
||||||
"cmd.exe /c dir" >>command
|
"cmd.exe /c dir" >>command
|
||||||
"dir.txt" temp-file >>stdout
|
"dir.txt" temp-file >>stdout
|
||||||
try-process
|
try-process
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ ] [ "dir.txt" temp-file delete-file ] unit-test
|
[ ] [ "dir.txt" temp-file delete-file ] unit-test
|
||||||
] times
|
] times
|
||||||
|
|
||||||
[ "append-test" temp-file delete-file ] ignore-errors
|
[ "append-test" temp-file delete-file ] ignore-errors
|
||||||
|
|
||||||
[ "Hello appender\r\nHello appender\r\n" ] [
|
[ "Hello appender\r\nHello appender\r\n" ] [
|
||||||
2 [
|
2 [
|
||||||
"resource:basis/io/windows/nt/launcher/test" [
|
"resource:basis/io/windows/nt/launcher/test" [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "append.factor" 3array >>command
|
vm "-script" "append.factor" 3array >>command
|
||||||
"append-test" temp-file <appender> >>stdout
|
"append-test" temp-file <appender> >>stdout
|
||||||
try-process
|
try-process
|
||||||
] with-directory
|
] with-directory
|
||||||
] times
|
] times
|
||||||
|
|
||||||
"append-test" temp-file ascii file-contents
|
"append-test" temp-file ascii file-contents
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
Loading…
Reference in New Issue