diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2019-01-04 18:36:15 -0800 | 
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2019-01-04 18:36:15 -0800 | 
| commit | fc87925b772b3e0e47cbdb30878e0288f1bb6853 (patch) | |
| tree | c91f225f342a7bb4c45f1840fe22e3f858697a56 | |
| parent | ae4a5f48584ae88fc4c812270ad9990b694f7398 (diff) | |
| download | pandoc-fc87925b772b3e0e47cbdb30878e0288f1bb6853.tar.gz | |
Tests: Fix findPandoc to work with Windows.
| -rw-r--r-- | pandoc.cabal | 2 | ||||
| -rw-r--r-- | test/Tests/Helpers.hs | 5 | 
2 files changed, 7 insertions, 0 deletions
| diff --git a/pandoc.cabal b/pandoc.cabal index c23552c08..5efd740cd 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -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 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 | 
