Skip to content

Commit 1c55cb4

Browse files
committed
Add regression test for Fourmolu fixities
1 parent 71cc7b0 commit 1c55cb4

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

Diff for: plugins/hls-fourmolu-plugin/test/Main.hs

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ tests =
2929
formatDoc doc (FormattingOptions 4 True Nothing Nothing Nothing)
3030
, goldenWithFourmolu cli "formats imports correctly" "Fourmolu2" "formatted" $ \doc -> do
3131
formatDoc doc (FormattingOptions 4 True Nothing Nothing Nothing)
32+
, goldenWithFourmolu cli "uses correct operator fixities" "Fourmolu3" "formatted" $ \doc -> do
33+
formatDoc doc (FormattingOptions 4 True Nothing Nothing Nothing)
3234
]
3335

3436
goldenWithFourmolu :: Bool -> TestName -> FilePath -> FilePath -> (TextDocumentIdentifier -> Session ()) -> TestTree
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
b :: Bool
2+
b =
3+
id $
4+
id $
5+
case True && True of
6+
True -> True
7+
False -> False
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
b :: Bool
2+
b =
3+
id $ id $
4+
case True && True of
5+
True -> True
6+
False -> False

0 commit comments

Comments
 (0)