-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re #6666 Re-activate test haddock-options
- Loading branch information
Showing
1 changed file
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |