summaryrefslogtreecommitdiff
path: root/test/Tests/Command.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-01-19 21:25:24 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2018-01-19 21:25:24 -0800
commitb8ffd834cff717fe424f22e506351f2ecec4655a (patch)
tree70359c33066bebf2ec4c54c1c2d78f38b49c0fb8 /test/Tests/Command.hs
parent8b3707de0402165b5691f626370203fa8982a5dc (diff)
hlint code improvements.
Diffstat (limited to 'test/Tests/Command.hs')
-rw-r--r--test/Tests/Command.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Tests/Command.hs b/test/Tests/Command.hs
index 4999ff45a..de83d0639 100644
--- a/test/Tests/Command.hs
+++ b/test/Tests/Command.hs
@@ -40,7 +40,7 @@ runTest testname pandocpath cmd inp norm = testCase testname $ do
-- filter \r so the tests will work on Windows machines
let out = filter (/= '\r') $ err' ++ out'
result <- if ec == ExitSuccess
- then do
+ then
if out == norm
then return TestPassed
else return
@@ -52,6 +52,7 @@ runTest testname pandocpath cmd inp norm = testCase testname $ do
assertBool (show result) (result == TestPassed)
tests :: TestTree
+{-# NOINLINE tests #-}
tests = unsafePerformIO $ do
pandocpath <- findPandoc
files <- filter (".md" `isSuffixOf`) <$>
@@ -89,7 +90,6 @@ extractCommandTest pandocpath fp = unsafePerformIO $ do
contents <- UTF8.toText <$> BS.readFile ("command" </> fp)
Pandoc _ blocks <- runIOorExplode (readMarkdown
def{ readerExtensions = pandocExtensions } contents)
- let codeblocks = map extractCode $ filter isCodeBlock $ blocks
+ let codeblocks = map extractCode $ filter isCodeBlock blocks
let cases = map (runCommandTest pandocpath) $ zip [1..] codeblocks
return $ testGroup fp cases
-