diff options
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 - |