Fix Process Spec On Windows (#1386)

This commit is contained in:
Radosław Waśko 2021-01-04 15:51:26 +01:00 committed by GitHub
parent 58346917eb
commit 2cf4b08241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,12 @@ import Test
spec = describe "Process" <|
it "should call simple command" <|
case Process.execute "echo" of
result = case Platform.os of
Platform.Windows ->
Process.run_command "PowerShell" ["-Command", "exit 0"]
_ ->
Process.run_command "bash" ["-c", "exit 0"]
case result of
Exit_Success -> Test.Success
Exit_Failure code -> Test.fail ("Process failed with code " + code)
it "should return exit code" <|