Tests: Fix findPandoc to work with Windows.
This commit is contained in:
parent
ae4a5f4858
commit
fc87925b77
2 changed files with 7 additions and 0 deletions
|
@ -713,6 +713,8 @@ test-suite test-pandoc
|
|||
Tests.Writers.FB2
|
||||
Tests.Writers.Powerpoint
|
||||
Tests.Writers.OOXML
|
||||
if os(windows)
|
||||
cpp-options: -D_WINDOWS
|
||||
ghc-options: -rtsopts -Wall -fno-warn-unused-do-bind -threaded
|
||||
default-language: Haskell2010
|
||||
other-extensions: NoImplicitPrelude
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue