-
-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No newline before lambda unless really needed. Fix 503 (#529)
* Tests * autoNlnByFutureLazy for App(Lambda). Fix #503
- Loading branch information
1 parent
0e4e6b6
commit 3d6fc2a
Showing
5 changed files
with
39 additions
and
8 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,22 @@ | ||
module Fantomas.Tests.AppTests | ||
|
||
open NUnit.Framework | ||
open FsUnit | ||
open Fantomas.Tests.TestHelper | ||
|
||
// the current behavior results in a compile error since the |> is merged to the last line | ||
[<Test>] | ||
let ``no nln before lambda #503``() = | ||
formatSourceString false """ | ||
let a = | ||
b | ||
|> List.exists (fun p -> | ||
p.a && p.b |> List.exists (fun o -> o.a = "lorem ipsum dolor sit amet")) | ||
""" { config with PageWidth = 80 } | ||
|> prepend newline | ||
|> should equal """ | ||
let a = | ||
b | ||
|> List.exists (fun p -> | ||
p.a && p.b |> List.exists (fun o -> o.a = "lorem ipsum dolor sit amet")) | ||
""" |
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