git.iko.soy/typeable/pandoc
on master help sign in
Tests: Fix findPandoc to work with Windows.
commitfc87925b772b3e0e47cbdb30878e0288f1bb6853 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 4 Jan 2019, 18:36 (8 years ago) parentae4a5f4
2 files changed+7
pandoc.cabal+2 test/Tests/Helpers.hs+5
pandoc.cabal+2
@@ -713,6 +713,8 @@ test-suite test-pandoc
713713 Tests.Writers.FB2
714714 Tests.Writers.Powerpoint
715715 Tests.Writers.OOXML
716+ if os(windows)
717+ cpp-options: -D_WINDOWS
716718 ghc-options: -rtsopts -Wall -fno-warn-unused-do-bind -threaded
717719 default-language: Haskell2010
718720 other-extensions: NoImplicitPrelude
test/Tests/Helpers.hs+5
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE NoImplicitPrelude #-}
23{-# LANGUAGE FlexibleInstances #-}
34{-# LANGUAGE TypeSynonymInstances #-}
@@ -100,7 +101,11 @@ findPandoc = do
100101 "test-pandoc" : "build" : ps
101102 -> joinPath (reverse ps) </> "build" </> "pandoc"
102103 _ -> error $ "findPandoc: could not find pandoc executable")
104+#ifdef _WINDOWS
105+ </> "pandoc" <.> "exe"
106+#else
103107 </> "pandoc"
108+#endif
104109 found <- doesFileExist pandocPath
105110 if found
106111 then return pandocPath