From 7c424b315cb814b952d9bd9d5f027beb70169bff Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 31 Jan 2019 20:56:20 -0800 Subject: Tests: avoid calling findPandoc multiple times. --- test/test-pandoc.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/test-pandoc.hs') diff --git a/test/test-pandoc.hs b/test/test-pandoc.hs index 946a676e0..64f381021 100644 --- a/test/test-pandoc.hs +++ b/test/test-pandoc.hs @@ -44,9 +44,10 @@ import qualified Tests.Writers.TEI import Tests.Helpers (findPandoc) import Text.Pandoc.Shared (inDirectory) -tests :: TestTree -tests = testGroup "pandoc tests" [ Tests.Command.tests - , testGroup "Old" Tests.Old.tests +tests :: FilePath -> TestTree +tests pandocPath = testGroup "pandoc tests" + [ Tests.Command.tests pandocPath + , testGroup "Old" (Tests.Old.tests pandocPath) , testGroup "Shared" Tests.Shared.tests , testGroup "Writers" [ testGroup "Native" Tests.Writers.Native.tests @@ -92,4 +93,4 @@ main = do inDirectory "test" $ do fp <- findPandoc putStrLn $ "Using pandoc executable at " ++ fp - defaultMain tests + defaultMain $ tests fp -- cgit v1.2.3