-
-
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.
Merge pull request #2785 from theimowski/fix-2784
add a double indent when the indent_size is lower than the default 4 spaces
- Loading branch information
Showing
4 changed files
with
46 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module Fantomas.Core.Tests.TryWithTests | ||
|
||
open NUnit.Framework | ||
open FsUnit | ||
open Fantomas.Core.Tests.TestHelper | ||
|
||
[<Test>] | ||
let ``try-with expression with long when guard - when breaking line, add a double indent when the indent_size is lower than the default 4 spaces, 2784`` | ||
() | ||
= | ||
formatSourceString | ||
false | ||
""" | ||
try | ||
c () | ||
with | ||
| :? WebSocketException as e when e.WebSocketErrorCode = WebSocketError.ConnectionClosedPrematurely && sourceParty = Agent -> | ||
() | ||
""" | ||
{ config with IndentSize = 2 } | ||
|> prepend newline | ||
|> should | ||
equal | ||
""" | ||
try | ||
c () | ||
with :? WebSocketException as e when | ||
e.WebSocketErrorCode = WebSocketError.ConnectionClosedPrematurely | ||
&& sourceParty = Agent -> | ||
() | ||
""" |
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