Commit 37230a6a authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Test for new defaulting-logic

This tweaks the existing `CustomPlain` test to test the legacy
defaulting logic for the unconditionally `Custom` default.

Morever, a new `SimpleDefault` test has been added which tests
that `cabal-version:2.1` does indeed infer `build-type: Simple`
when there is no `custom-setup` stanza defined.
parent 295793e4
......@@ -3,7 +3,6 @@ version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Custom
cabal-version: >=1.10
library
......
# Setup configure
Resolving dependencies...
Configuring plain-0.1.0.0...
Warning: No 'build-type' specified. If you do not need a custom Setup.hs or ./configure script then use 'build-type: Simple'.
# Setup build
Preprocessing library for plain-0.1.0.0..
Building library for plain-0.1.0.0..
# Setup configure
Configuring plain-0.1.0.0...
Warning: No 'build-type' specified. If you do not need a custom Setup.hs or ./configure script then use 'build-type: Simple'.
# Setup build
Preprocessing library for plain-0.1.0.0..
Building library for plain-0.1.0.0..
main :: IO ()
main = fail "Setup called despite `build-type:Simple`"
import Test.Cabal.Prelude
main = cabalTest $ do
recordMode DoNotRecord $ do
-- TODO: Hack; see also CustomDep/cabal.test.hs
withEnvFilter (/= "HOME") $ do
cabal "new-build" ["all"]
cabal-version: 2.1
name: my
version: 0
-- tests whether the default is `build-type: Simple`
-- (for cabal-version >= 2.1)
library
exposed-modules: M
build-depends: base
default-language: Haskell2010
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment