Skip to content

Commit

Permalink
Add test for haskell#6853
Browse files Browse the repository at this point in the history
It's import that flag is *True*, so it's passed without prefix-sign.
  • Loading branch information
phadej committed May 29, 2020
1 parent 4d64ad0 commit 0140342
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cabal-testsuite/PackageTests/Regression/T6853/cabal.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cabal v2-build
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- pkg-foo-0 (lib) (first run)
Configuring library for pkg-foo-0..
Preprocessing library for pkg-foo-0..
Building library for pkg-foo-0..
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages: pkg-foo/
3 changes: 3 additions & 0 deletions cabal-testsuite/PackageTests/Regression/T6853/cabal.test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Test.Cabal.Prelude
main = cabalTest $
cabal "v2-build" ["all"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module Foo where
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cabal-version: 2.2
name: pkg-foo
version: 0

flag foo-bar
description: Should be toggled
manual: False
default: False

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

-- this says "toggle me"
if !flag(foo-bar)
build-depends: base <0

0 comments on commit 0140342

Please sign in to comment.