Skip to content

Commit

Permalink
Trivia inside chain.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Jan 10, 2023
1 parent 9170bcc commit 6a52566
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/Fantomas.Core.Tests/ChainTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,40 @@ A.B
.C(D)
.E.[0]
"""

[<Test>]
let ``trivia inside chain, 2686`` () =
formatSourceString
false
"""
builder.
FirstThing<X>(fun lambda ->
// aaaaaa
()
)
.SecondThing<Y>(fun next ->
// bbbbb
next
)
// ccccc
.ThirdThing<Z>().X
"""
{ config with
MultiLineLambdaClosingNewline = true }
|> prepend newline
|> should
equal
"""
builder
.FirstThing<X>(fun lambda ->
// aaaaaa
()
)
.SecondThing<Y>(fun next ->
// bbbbb
next
)
// ccccc
.ThirdThing<Z>()
.X
"""

0 comments on commit 6a52566

Please sign in to comment.