summaryrefslogtreecommitdiffhomepage
path: root/tests/Language/Haskell/Stylish/Tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Language/Haskell/Stylish/Tests.hs')
-rw-r--r--tests/Language/Haskell/Stylish/Tests.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/Language/Haskell/Stylish/Tests.hs b/tests/Language/Haskell/Stylish/Tests.hs
index 3a27ce7..59ca92b 100644
--- a/tests/Language/Haskell/Stylish/Tests.hs
+++ b/tests/Language/Haskell/Stylish/Tests.hs
@@ -28,10 +28,12 @@ tests = testGroup "Language.Haskell.Stylish.Step.Tabs.Tests"
case01 :: Assertion
case01 = (@?= result) =<< format Nothing Nothing input
where
- input = "module Herp where\n data Foo = Bar | Baz"
+ input = "module Herp where\ndata Foo = Bar | Baz { baz :: Int }"
result = Right [ "module Herp where"
, "data Foo = Bar"
, " | Baz"
+ , " { baz :: Int"
+ , " }"
]
@@ -47,10 +49,12 @@ case02 = withTestDirTree $ do
actual <- format (Just $ ConfigPath "test-config.yaml") Nothing input
actual @?= result
where
- input = "module Herp where\n data Foo = Bar | Baz"
+ input = "module Herp where\ndata Foo = Bar | Baz { baz :: Int }"
result = Right [ "module Herp where"
, "data Foo = Bar"
, " | Baz"
+ , " { baz :: Int"
+ , " }"
]