diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-01-19 21:25:24 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-01-19 21:25:24 -0800 |
commit | b8ffd834cff717fe424f22e506351f2ecec4655a (patch) | |
tree | 70359c33066bebf2ec4c54c1c2d78f38b49c0fb8 /test/Tests/Command.hs | |
parent | 8b3707de0402165b5691f626370203fa8982a5dc (diff) |
hlint code improvements.
Diffstat (limited to 'test/Tests/Command.hs')
-rw-r--r-- | test/Tests/Command.hs | 6 |
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 - |