diff --git a/src/Fantomas.Tests/ControlStructureTests.fs b/src/Fantomas.Tests/ControlStructureTests.fs index 75bd694504..21d89f57f9 100644 --- a/src/Fantomas.Tests/ControlStructureTests.fs +++ b/src/Fantomas.Tests/ControlStructureTests.fs @@ -835,36 +835,4 @@ try with ex -> Infrastructure.ReportWarning ex return None -""" - -[] -let ``MultilineBlockBracketsOnSameColumn should be honored inside match block, 1238`` () = - formatSourceString - false - """ - module Foo = - let Bar () = - if x then - match foo with - | { Bar = true - Baz = _ } -> failwith "xxx" - | _ -> None -""" - { config with - MaxLineLength = 30 - MultilineBlockBracketsOnSameColumn = true } - |> prepend newline - |> should - equal - """ -module Foo = - let Bar () = - if x then - match foo with - | { - Bar = true - Baz = _ - } - -> failwith "xxx" - | _ -> None -""" +""" \ No newline at end of file diff --git a/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs b/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs index 90d10bc907..4427b78f9c 100644 --- a/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs +++ b/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs @@ -560,11 +560,12 @@ let ``SynPat.Record in pattern match with bracketOnSeparateLine`` () = equal """ match foo with -| { Bar = bar - Level = 12 - Vibes = plenty - Lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " } -> - "7" +| { + Bar = bar + Level = 12 + Vibes = plenty + Lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " + } -> "7" | _ -> "8" """ @@ -955,3 +956,34 @@ type TestType = // Some more comments private { Meh : TimeSpan } """ + +[] +let ``MultilineBlockBracketsOnSameColumn should be honored inside match block, 1238`` () = + formatSourceString + false + """ + module Foo = + let Bar () = + if x then + match foo with + | { Bar = true + Baz = _ } -> failwith "xxx" + | _ -> None +""" + { config with + MaxLineLength = 30 } + |> prepend newline + |> should + equal + """ +module Foo = + let Bar () = + if x then + match foo with + | { + Bar = true + Baz = _ + } -> + failwith "xxx" + | _ -> None +""" \ No newline at end of file