summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-11-05 11:05:28 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2012-11-05 11:05:28 +0100
commit1354152db499f942f20c6a433a9c26bf3ddb927e (patch)
tree8e18879e66d9e69c4a9eb7fe67c3efdb29e7ffe0 /tests
parentf9c412f27e5c839d2ddfddfee4d381e7ea75e057 (diff)
downloadstylish-haskell-1354152db499f942f20c6a433a9c26bf3ddb927e.tar.gz
Micro cleanup
Diffstat (limited to 'tests')
-rw-r--r--tests/Language/Haskell/Stylish/Step/Imports/Tests.hs27
1 files changed, 21 insertions, 6 deletions
diff --git a/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs b/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs
index d3b205a..c62fe0f 100644
--- a/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs
+++ b/tests/Language/Haskell/Stylish/Step/Imports/Tests.hs
@@ -24,6 +24,7 @@ tests = testGroup "Language.Haskell.Stylish.Step.Imports.Tests"
, testCase "case 04" case04
, testCase "case 05" case05
, testCase "case 06" case06
+ , testCase "case 07" case07
]
@@ -123,15 +124,29 @@ case05 = input' @=? testStep (step 80 Group) input'
input' = "import Distribution.PackageDescription.Configuration " ++
"(finalizePackageDescription)\n"
+
--------------------------------------------------------------------------------
case06 :: Assertion
-case06 = expected @=? testStep (step 80 File) input'
+case06 = input' @=? testStep (step 80 File) input'
where
- input' =
- "import Data.Aeson.Types (object, typeMismatch, FromJSON(..)," ++
- "ToJSON(..), Value(..), parseEither, (.!=), (.:), (.:?), (.=))"
+ input' = unlines
+ [ "import Bar.Qux"
+ , "import Foo.Bar"
+ ]
+
+
+--------------------------------------------------------------------------------
+case07 :: Assertion
+case07 = expected @=? testStep (step 80 File) input'
+ where
+ input' = unlines
+ [ "import Bar.Qux"
+ , ""
+ , "import qualified Foo.Bar"
+ ]
expected = unlines
- [ "import Data.Aeson.Types (FromJSON (..), ToJSON (..), Value (..), object,"
- , " parseEither, typeMismatch, (.!=), (.:), (.:?), (.=))"
+ [ "import Bar.Qux"
+ , ""
+ , "import qualified Foo.Bar"
]