test: test process exit code

This commit is contained in:
Sebastian Ullrich 2020-08-30 11:10:29 +02:00 committed by Leonardo de Moura
parent 1fb1a6f913
commit 8ed4d1d7e4
2 changed files with 5 additions and 0 deletions

View file

@ -1,5 +1,9 @@
open IO.Process
#eval do
child ← spawn { cmd := "sh", args := #["-c", "exit 1"] };
child.wait
#eval do
child ← spawn { cmd := "sh", args := #["-c", "echo hi!"] };
child.wait

View file

@ -1,3 +1,4 @@
1
hi!
0
"ho!\n"