aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-01-04 18:36:15 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-01-04 18:36:15 -0800
commitfc87925b772b3e0e47cbdb30878e0288f1bb6853 (patch)
treec91f225f342a7bb4c45f1840fe22e3f858697a56 /test
parentae4a5f48584ae88fc4c812270ad9990b694f7398 (diff)
downloadpandoc-fc87925b772b3e0e47cbdb30878e0288f1bb6853.tar.gz
Tests: Fix findPandoc to work with Windows.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Helpers.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Tests/Helpers.hs b/test/Tests/Helpers.hs
index 3a8058114..5e3afe0c7 100644
--- a/test/Tests/Helpers.hs
+++ b/test/Tests/Helpers.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
@@ -100,7 +101,11 @@ findPandoc = do
"test-pandoc" : "build" : ps
-> joinPath (reverse ps) </> "build" </> "pandoc"
_ -> error $ "findPandoc: could not find pandoc executable")
+#ifdef _WINDOWS
+ </> "pandoc" <.> "exe"
+#else
</> "pandoc"
+#endif
found <- doesFileExist pandocPath
if found
then return pandocPath