-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
module Fake.Core.ProcessTests | ||
|
||
open System | ||
open Fake.Core | ||
open Expecto | ||
open Expecto.Flip | ||
|
||
|
||
[<Tests>] | ||
let tests = | ||
testList "Fake.Core.Process.Tests" [ | ||
testCase "Test that we can read messages correctly" <| fun _ -> | ||
let shell, command = | ||
if Environment.isWindows then | ||
"cmd", "/C \"echo 1&& echo 2\"" | ||
else | ||
"sh", "-c \"echo '1'; echo '2'\"" | ||
let result = | ||
Process.execWithResult(fun proc -> | ||
{ proc with | ||
FileName = shell | ||
Arguments = command }) (TimeSpan.FromMinutes 1.) | ||
|
||
Expect.equal "Messages are not read correctly" ["1"; "2"] result.Messages | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters