test: robustly fix test on Windows

This commit is contained in:
Sebastian Ullrich 2020-08-30 10:28:36 +02:00 committed by Leonardo de Moura
parent 3546c8c355
commit 8b79e0f28c

View file

@ -1,16 +1,16 @@
open IO.Process
#eval do
child ← spawn { cmd := "bash", args := #["-c", "echo hi!"] };
child ← spawn { cmd := "sh", args := #["-c", "echo hi!"] };
child.wait
#eval do
child ← spawn { cmd := "bash", args := #["-c", "echo ho!"], stdout := Stdio.piped };
child ← spawn { cmd := "sh", args := #["-c", "echo ho!"], stdout := Stdio.piped };
child.wait;
child.stdout.readToEnd
#eval do
child ← spawn { cmd := "bash", args := #["-c", "head -n 1"], stdin := Stdio.piped, stdout := Stdio.piped };
child ← spawn { cmd := "head", args := #["-n1"], stdin := Stdio.piped, stdout := Stdio.piped };
child.stdin.putStrLn "hu!";
child.stdin.flush;
child.wait;