diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Language/Haskell/Stylish/Step/Imports/Tests.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs b/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs index bb56bab..fea3b78 100644 --- a/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs +++ b/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs @@ -59,6 +59,7 @@ tests = testGroup "Language.Haskell.Stylish.Step.Imports.Tests" , testCase "case 26 (issue 185)" case26 , testCase "case 27" case27 , testCase "case 28" case28 + , testCase "case 29" case29 ] @@ -911,3 +912,25 @@ case28 = expected @=? testSnippet (step (Just 80) $ fromImportAlign Global) inpu , "import Data.Set (empty, intersect)" , "import Data.Set (empty, nub)" ] + + +-------------------------------------------------------------------------------- +case29 :: Assertion +case29 = expected @=? testSnippet (step Nothing $ fromImportAlign Group) input' + where + -- Check that "Group" mode recognizes groups with multi-line imports + input' = Snippet + [ "import Foo (foo)" + , "import BarBar ( bar" + , " , kek)" + , "import Abcd ()" + , "" + , "import A (A)" + ] + expected = Snippet + [ "import Abcd ()" + , "import BarBar (bar, kek)" + , "import Foo (foo)" + , "" + , "import A (A)" + ]
\ No newline at end of file |