-
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add missing raise for formatting functions (#1376)
* add missing raise for formatting functions * add ExitCodeTests file to include test of cli formatting without check parameter Co-authored-by: Florian Verdonck <[email protected]>
- Loading branch information
Showing
4 changed files
with
26 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Fantomas.CoreGlobalTool.Tests.ExitCodeTests | ||
|
||
open NUnit.Framework | ||
open FsUnit | ||
open Fantomas.CoreGlobalTool.Tests.TestHelpers | ||
|
||
[<Literal>] | ||
let WithErrors = """let a =""" | ||
|
||
[<Test>] | ||
let ``invalid files should report exit code 1`` () = | ||
use fileFixture = new TemporaryFileCodeSample(WithErrors) | ||
let (exitCode, _) = formatCode fileFixture.Filename | ||
exitCode |> should equal 1 |
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