diff --git a/src/Fantomas.Tests/FunctionDefinitionTests.fs b/src/Fantomas.Tests/FunctionDefinitionTests.fs index 7a8173f889..246362e755 100644 --- a/src/Fantomas.Tests/FunctionDefinitionTests.fs +++ b/src/Fantomas.Tests/FunctionDefinitionTests.fs @@ -484,4 +484,35 @@ module FormatCode = : HttpResponse = Http.main CodeFormatter.GetVersion format FormatConfig.FormatConfig.Default log req +""" + +[] +let ``long function signature, 492`` () = + formatSourceString false """ +let private addTaskToScheduler (scheduler : IScheduler) taskName taskCron prio (task : unit -> unit) groupName = + let mutable jobDataMap = JobDataMap() + jobDataMap.["task"] <- task + let job = + JobBuilder.Create().UsingJobData(jobDataMap) + .WithIdentity(taskName, groupName).Build() + 1 +""" ({ config with PageWidth = 100 }) + |> prepend newline + |> should equal """ +let private addTaskToScheduler + (scheduler: IScheduler) + taskName + taskCron + prio + (task: unit -> unit) + groupName + = + let mutable jobDataMap = JobDataMap() + jobDataMap.["task"] <- task + + let job = + JobBuilder.Create().UsingJobData(jobDataMap).WithIdentity(taskName, groupName) + .Build() + + 1 """ \ No newline at end of file