use the console factor for tests
parent
eec86d6043
commit
3d84d17cc6
|
@ -1,7 +1,7 @@
|
||||||
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
|
||||||
io.files.temp io.directories io.pathnames ;
|
io.files.temp io.directories io.pathnames splitting ;
|
||||||
IN: io.launcher.windows.nt.tests
|
IN: io.launcher.windows.nt.tests
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
|
@ -23,9 +23,12 @@ IN: io.launcher.windows.nt.tests
|
||||||
|
|
||||||
[ f ] [ "notepad" get process-running? ] unit-test
|
[ f ] [ "notepad" get process-running? ] unit-test
|
||||||
|
|
||||||
|
: console-vm ( -- path )
|
||||||
|
vm ".exe" ?tail [ ".com" append ] when ;
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
<process>
|
<process>
|
||||||
vm "-quiet" "-run=hello-world" 3array >>command
|
console-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
|
||||||
|
@ -36,7 +39,7 @@ IN: io.launcher.windows.nt.tests
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
<process>
|
<process>
|
||||||
vm "-run=listener" 2array >>command
|
console-vm "-run=listener" 2array >>command
|
||||||
+closed+ >>stdin
|
+closed+ >>stdin
|
||||||
try-process
|
try-process
|
||||||
] unit-test
|
] unit-test
|
||||||
|
@ -47,7 +50,7 @@ IN: io.launcher.windows.nt.tests
|
||||||
[ ] [
|
[ ] [
|
||||||
launcher-test-path [
|
launcher-test-path [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "stderr.factor" 3array >>command
|
console-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
|
||||||
|
@ -65,7 +68,7 @@ IN: io.launcher.windows.nt.tests
|
||||||
[ ] [
|
[ ] [
|
||||||
launcher-test-path [
|
launcher-test-path [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "stderr.factor" 3array >>command
|
console-vm "-script" "stderr.factor" 3array >>command
|
||||||
"out.txt" temp-file >>stdout
|
"out.txt" temp-file >>stdout
|
||||||
+stdout+ >>stderr
|
+stdout+ >>stderr
|
||||||
try-process
|
try-process
|
||||||
|
@ -79,7 +82,7 @@ IN: io.launcher.windows.nt.tests
|
||||||
[ "output" ] [
|
[ "output" ] [
|
||||||
launcher-test-path [
|
launcher-test-path [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "stderr.factor" 3array >>command
|
console-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
|
||||||
|
@ -92,7 +95,7 @@ IN: io.launcher.windows.nt.tests
|
||||||
[ t ] [
|
[ t ] [
|
||||||
launcher-test-path [
|
launcher-test-path [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "env.factor" 3array >>command
|
console-vm "-script" "env.factor" 3array >>command
|
||||||
ascii <process-reader> contents
|
ascii <process-reader> contents
|
||||||
] with-directory eval
|
] with-directory eval
|
||||||
|
|
||||||
|
@ -102,7 +105,7 @@ IN: io.launcher.windows.nt.tests
|
||||||
[ t ] [
|
[ t ] [
|
||||||
launcher-test-path [
|
launcher-test-path [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "env.factor" 3array >>command
|
console-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
|
||||||
|
@ -114,7 +117,7 @@ IN: io.launcher.windows.nt.tests
|
||||||
[ "B" ] [
|
[ "B" ] [
|
||||||
launcher-test-path [
|
launcher-test-path [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "env.factor" 3array >>command
|
console-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
|
||||||
|
@ -125,7 +128,7 @@ IN: io.launcher.windows.nt.tests
|
||||||
[ f ] [
|
[ f ] [
|
||||||
launcher-test-path [
|
launcher-test-path [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "env.factor" 3array >>command
|
console-vm "-script" "env.factor" 3array >>command
|
||||||
{ { "USERPROFILE" "XXX" } } >>environment
|
{ { "USERPROFILE" "XXX" } } >>environment
|
||||||
+prepend-environment+ >>environment-mode
|
+prepend-environment+ >>environment-mode
|
||||||
ascii <process-reader> contents
|
ascii <process-reader> contents
|
||||||
|
@ -151,7 +154,7 @@ IN: io.launcher.windows.nt.tests
|
||||||
2 [
|
2 [
|
||||||
launcher-test-path [
|
launcher-test-path [
|
||||||
<process>
|
<process>
|
||||||
vm "-script" "append.factor" 3array >>command
|
console-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
|
||||||
|
|
Loading…
Reference in New Issue