diff options
author | Ondřej Janošík <j.ondra14@gmail.com> | 2015-09-21 00:14:21 +0200 |
---|---|---|
committer | Ondřej Janošík <j.ondra14@gmail.com> | 2015-09-21 00:14:21 +0200 |
commit | 96a1d05eb0738042c771d4b2ac7fd1f2801d2935 (patch) | |
tree | ceeea86ae8d45718484bc543b34bb370e81460cf /tests | |
parent | 9bface0dfe50822eca317fd0d7cb89f5f3360279 (diff) | |
download | stylish-haskell-96a1d05eb0738042c771d4b2ac7fd1f2801d2935.tar.gz |
Sorting of import sub-lists
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Language/Haskell/Stylish/Step/Imports/Tests.hs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs b/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs index f7f840d..36e54d9 100644 --- a/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs +++ b/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs @@ -43,6 +43,7 @@ tests = testGroup "Language.Haskell.Stylish.Step.Imports.Tests" , testCase "case 14" case14 , testCase "case 15" case15 , testCase "case 16" case16 + , testCase "case 17" case17 ] @@ -382,7 +383,7 @@ case16 = expected , "" , "import Data.Maybe (Maybe(Just, Nothing))" , "" - , "import Data.Foo (Foo(Foo, Bar), Goo(Goo))" + , "import Data.Foo (Foo(Bar, Foo), Goo(Goo))" ] input' = unlines @@ -393,3 +394,20 @@ case16 = expected , "" , "import Data.Foo (Foo (Foo,Bar), Goo(Goo))" ] + +-------------------------------------------------------------------------------- +case17 :: Assertion +case17 = expected + @=? testStep (step 80 $ Align None AfterAlias Multiline 4 True) input' + where + expected = unlines + [ "import Control.Applicative (Applicative (pure, (<*>)))" + , "" + , "import Data.Identity (Identity (Identity, runIdentity))" + ] + + input' = unlines + [ "import Control.Applicative (Applicative ((<*>),pure))" + , "" + , "import Data.Identity (Identity (runIdentity,Identity))" + ] |