diff options
author | 1Computer1 <22125769+1Computer1@users.noreply.github.com> | 2020-10-08 07:40:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-08 13:40:26 +0200 |
commit | 9638bba137a232541e7f285cdd49b540eb010f41 (patch) | |
tree | 422d79b86d7139a9270b9740c8b3ef9c13055eb4 /tests | |
parent | 0e2ebd1722871dce2207b44266a6e4420c13a588 (diff) | |
download | stylish-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.hs | 14 |
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" + ] |