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.FB2
|
||||||
Tests.Writers.Powerpoint
|
Tests.Writers.Powerpoint
|
||||||
Tests.Writers.OOXML
|
Tests.Writers.OOXML
|
||||||
|
if os(windows)
|
||||||
|
cpp-options: -D_WINDOWS
|
||||||
ghc-options: -rtsopts -Wall -fno-warn-unused-do-bind -threaded
|
ghc-options: -rtsopts -Wall -fno-warn-unused-do-bind -threaded
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
other-extensions: NoImplicitPrelude
|
other-extensions: NoImplicitPrelude
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
{-# LANGUAGE NoImplicitPrelude #-}
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE TypeSynonymInstances #-}
|
{-# LANGUAGE TypeSynonymInstances #-}
|
||||||
|
@ -100,7 +101,11 @@ findPandoc = do
|
||||||
"test-pandoc" : "build" : ps
|
"test-pandoc" : "build" : ps
|
||||||
-> joinPath (reverse ps) </> "build" </> "pandoc"
|
-> joinPath (reverse ps) </> "build" </> "pandoc"
|
||||||
_ -> error $ "findPandoc: could not find pandoc executable")
|
_ -> error $ "findPandoc: could not find pandoc executable")
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
</> "pandoc" <.> "exe"
|
||||||
|
#else
|
||||||
</> "pandoc"
|
</> "pandoc"
|
||||||
|
#endif
|
||||||
found <- doesFileExist pandocPath
|
found <- doesFileExist pandocPath
|
||||||
if found
|
if found
|
||||||
then return pandocPath
|
then return pandocPath
|
||||||
|
|
Loading…
Reference in a new issue