Skip to content

Commit

Permalink
Re #6666 Re-activate test haddock-options
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Dec 11, 2024
1 parent b5bc0cc commit 6a2f651
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions tests/integration/tests/haddock-options/Main.hs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import StackTest
import Control.Monad ( unless )
import Data.List ( isInfixOf )
import StackTest

main :: IO ()
main = do
removeDirIgnore ".stack-work"
removeDirIgnore ".stack-work"

-- Disabling the test with GHC 9.8.4 because, unlike earlier versions, it fails
-- to fail, despite the Haddock options working as expected.
--
-- -- Fails to work because BAR is defined here and FOO in stack file
-- stackErr ["haddock", "--haddock-arguments", "--optghc=-DBAR"]
stack ["clean"]
-- Works just fine, test #3099 while at it.
stack ["haddock", "--no-haddock-hyperlink-source"]
stack ["clean"]
-- Fails to work because we have bad argument
stackErr ["haddock", "--haddock-arguments", "--stack_it_badhaddockargument"]
-- BAR is defined here and FOO in stack.yaml file
stackCheckStderr ["haddock", "--haddock-arguments", "--optghc=-DBAR"] $ \s ->
unless ("error: FOO and BAR is defined" `isInfixOf` s) $
error "FOO and BAR not both defined"
stack ["clean"]
-- Works just fine, test #3099 while at it.
stack ["haddock", "--no-haddock-hyperlink-source"]
stack ["clean"]
-- Fails to work because we have bad argument
stackErr ["haddock", "--haddock-arguments", "--stack_it_badhaddockargument"]

0 comments on commit 6a2f651

Please sign in to comment.