summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
author1Computer1 <22125769+1Computer1@users.noreply.github.com>2020-10-08 07:40:26 -0400
committerGitHub <noreply@github.com>2020-10-08 13:40:26 +0200
commit9638bba137a232541e7f285cdd49b540eb010f41 (patch)
tree422d79b86d7139a9270b9740c8b3ef9c13055eb4 /tests
parent0e2ebd1722871dce2207b44266a6e4420c13a588 (diff)
downloadstylish-haskell-9638bba137a232541e7f285cdd49b540eb010f41.tar.gz
Add support for aligning multi way ifs
Diffstat (limited to 'tests')
-rw-r--r--tests/Language/Haskell/Stylish/Step/SimpleAlign/Tests.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/Language/Haskell/Stylish/Step/SimpleAlign/Tests.hs b/tests/Language/Haskell/Stylish/Step/SimpleAlign/Tests.hs
index fa17784..5b502d1 100644
--- a/tests/Language/Haskell/Stylish/Step/SimpleAlign/Tests.hs
+++ b/tests/Language/Haskell/Stylish/Step/SimpleAlign/Tests.hs
@@ -31,6 +31,7 @@ tests = testGroup "Language.Haskell.Stylish.Step.SimpleAlign.Tests"
, testCase "case 10" case10
, testCase "case 11" case11
, testCase "case 12" case12
+ , testCase "case 13" case13
]
@@ -199,3 +200,16 @@ case12 = assertSnippet (step Nothing defaultConfig {cCases = False}) input input
, " Just y -> 1"
, " Nothing -> 2"
]
+
+
+--------------------------------------------------------------------------------
+case13 :: Assertion
+case13 = assertSnippet (step Nothing defaultConfig)
+ [ "cond n = if"
+ , " | n < 10, x <- 1 -> x"
+ , " | otherwise -> 2"
+ ]
+ [ "cond n = if"
+ , " | n < 10, x <- 1 -> x"
+ , " | otherwise -> 2"
+ ]