Skip to content

Commit

Permalink
Add regression test for lambda argument in multiline function applica…
Browse files Browse the repository at this point in the history
…tion. Fixes #1028. (#1764)
  • Loading branch information
nojaf authored Jun 5, 2021
1 parent ff30eac commit ffb2ee5
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/Fantomas.Tests/LambdaTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -834,3 +834,49 @@ fun _ _ -> ()
"""
fun _ _ -> ()
"""

[<Test>]
let ``lambda argument in multiline function application, 1028`` () =
formatSourceString
false
"""
module Lifecycle =
let init config =
async {
cfg <- config
do!
MassTransit.init
cfg.LoggerFactory cfg.AzureServiceBusConnStr cfg.QueueName cfg.LoggerFactory
(fun reg ->
reg.Consume User.handleUserInitiatedRegistration
reg.Consume User.handleUserUpdated
reg.Consume User.handleGetSessionUserIdRequest
)
}
"""
config
|> prepend newline
|> should
equal
"""
module Lifecycle =
let init config =
async {
cfg <- config
do!
MassTransit.init
cfg.LoggerFactory
cfg.AzureServiceBusConnStr
cfg.QueueName
cfg.LoggerFactory
(fun reg ->
reg.Consume User.handleUserInitiatedRegistration
reg.Consume User.handleUserUpdated
reg.Consume User.handleGetSessionUserIdRequest)
}
"""

0 comments on commit ffb2ee5

Please sign in to comment.