diff options
author | Artyom <yom@artyom.me> | 2017-04-17 18:12:57 +0300 |
---|---|---|
committer | Artyom <yom@artyom.me> | 2017-04-17 18:12:57 +0300 |
commit | 39421b3836a44489bcc56cd08c75c09ee70c5a69 (patch) | |
tree | 8602029036b43f266d9c60a733957459cf065f0a /tests | |
parent | b43f4721f6ec2799cbcd3acdbc41c05e91b2bd42 (diff) | |
download | stylish-haskell-39421b3836a44489bcc56cd08c75c09ee70c5a69.tar.gz |
Don't leave #-} hanging
Fixes #154
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Language/Haskell/Stylish/Step/LanguagePragmas/Tests.hs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/Language/Haskell/Stylish/Step/LanguagePragmas/Tests.hs b/tests/Language/Haskell/Stylish/Step/LanguagePragmas/Tests.hs index fe889e4..2d74813 100644 --- a/tests/Language/Haskell/Stylish/Step/LanguagePragmas/Tests.hs +++ b/tests/Language/Haskell/Stylish/Step/LanguagePragmas/Tests.hs @@ -26,6 +26,8 @@ tests = testGroup "Language.Haskell.Stylish.Step.LanguagePragmas.Tests" , testCase "case 06" case06 , testCase "case 07" case07 , testCase "case 08" case08 + , testCase "case 09" case09 + , testCase "case 10" case10 ] @@ -167,3 +169,31 @@ case08 = expected @=? testStep (step 80 CompactLine False False) input "TemplateHaskell #-}" , "{-# LANGUAGE TypeOperators, ViewPatterns #-}" ] + + +-------------------------------------------------------------------------------- +case09 :: Assertion +case09 = expected @=? testStep (step 80 Compact True False) input + where + input = unlines + [ "{-# LANGUAGE DefaultSignatures, FlexibleInstances, LambdaCase, " ++ + "TypeApplications" + , " #-}" + ] + expected = unlines + [ "{-# LANGUAGE DefaultSignatures, FlexibleInstances, LambdaCase," + , " TypeApplications #-}" + ] + +-------------------------------------------------------------------------------- +case10 :: Assertion +case10 = expected @=? testStep (step 80 Compact True False) input + where + input = unlines + [ "{-# LANGUAGE NondecreasingIndentation, ScopedTypeVariables," + , " TypeApplications #-}" + ] + expected = unlines + [ "{-# LANGUAGE NondecreasingIndentation, ScopedTypeVariables, " ++ + "TypeApplications #-}" + ] |