Skip to content

Commit 8f3c408

Browse files
authored
Merge pull request fsprojects#3232 from fsprojects/repo-assist/fix-issue-1740-idempotency-regression-test-b15031aa78b105e3
[Repo Assist] Regression test for idempotency bug with NUnit Assert.That lambda (fsprojects#1740)
2 parents 3df20ca + f499bd8 commit 8f3c408

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Type app closing angle bracket padded by previous expression length. [#3179](https://github.com/fsprojects/fantomas/issues/3179)
1414
- Dynamic operator on result of qualified function call causes formatting error. [#3135](https://github.com/fsprojects/fantomas/issues/3135)
1515
- Long delegate type with generic args no longer breaks around arrow. [#2468](https://github.com/fsprojects/fantomas/issues/2468)
16+
- Idempotency problem when formatting NUnit Assert.That with lambda argument. [#1740](https://github.com/fsprojects/fantomas/issues/1740)
1617

1718
## [8.0.0-alpha-002] - 2025-12-15
1819

src/Fantomas.Core.Tests/AppTests.fs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,3 +1183,24 @@ let ``don't indent function application arguments when function name is further
11831183
b
11841184
c))))))))))))))))))))))
11851185
"""
1186+
1187+
[<Test>]
1188+
let ``idempotency problem when formatting NUnit Assert.That with lambda, 1740`` () =
1189+
formatSourceString
1190+
"""
1191+
Assert.That(
1192+
Assert.Throws(fun () -> FooFooFooFooFooFoo.BarBar.dodododo filesfiles [] outoutout |> ignore)
1193+
.Message,
1194+
Is.EqualTo(message)
1195+
)
1196+
"""
1197+
config
1198+
|> prepend newline
1199+
|> should
1200+
equal
1201+
"""
1202+
Assert.That(
1203+
Assert.Throws(fun () -> FooFooFooFooFooFoo.BarBar.dodododo filesfiles [] outoutout |> ignore).Message,
1204+
Is.EqualTo(message)
1205+
)
1206+
"""

0 commit comments

Comments
 (0)