Skip to content

Commit

Permalink
v2-haddock should fail when v2-build fails
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Jul 7, 2019
1 parent 525ef66 commit 73751a9
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cabal-testsuite/PackageTests/NewHaddock/Fails/Example.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Example where

import Prelude

example :: Int
example = False
15 changes: 15 additions & 0 deletions cabal-testsuite/PackageTests/NewHaddock/Fails/cabal.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# cabal v2-build
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- example-1.0 (lib) (first run)
Configuring library for example-1.0..
Preprocessing library for example-1.0..
Building library for example-1.0..
# cabal v2-haddock
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- example-1.0 (lib) (first run)
Preprocessing library for example-1.0..
Running Haddock on library for example-1.0..
cabal: Failed to build documentation for example-1.0-inplace.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages: .
6 changes: 6 additions & 0 deletions cabal-testsuite/PackageTests/NewHaddock/Fails/cabal.test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Test.Cabal.Prelude
import System.Exit (ExitCode (..))

main = cabalTest $ do
fails $ cabal "v2-build" ["example"]
fails $ cabal "v2-haddock" ["example"]
9 changes: 9 additions & 0 deletions cabal-testsuite/PackageTests/NewHaddock/Fails/example.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: example
version: 1.0
build-type: Simple
cabal-version: >=1.10

library
default-language: Haskell2010
build-depends: base
exposed-modules: Example

0 comments on commit 73751a9

Please sign in to comment.