Skip to content

Commit

Permalink
Add a test for #3199.
Browse files Browse the repository at this point in the history
  • Loading branch information
23Skidoo committed Apr 17, 2016
1 parent e2da7ab commit 005c6ac
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cabal-install/tests/IntegrationTests/regression/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Helper to run Cabal
cabal() {
"$CABAL" $CABAL_ARGS "$@"
}

die() {
echo "die: $@"
exit 1
}
9 changes: 9 additions & 0 deletions cabal-install/tests/IntegrationTests/regression/t3199.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
. ./common.sh

if [[ `ghc --numeric-version` =~ "7\\." ]]; then
cd t3199
cabal sandbox init
cabal sandbox add-source ../../../../../Cabal
cabal install --package-db=clear --package-db=global --only-dep --dry-run \
| grep -q Cabal || die "Should've installed Cabal"
fi
4 changes: 4 additions & 0 deletions cabal-install/tests/IntegrationTests/regression/t3199/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Main where

main :: IO ()
main = putStrLn "Hello, Haskell!"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: test-t3199
version: 0.1.0.0
license: BSD3
author: Mikhail Glushenkov
maintainer: [email protected]
category: Test
build-type: Custom
cabal-version: >=1.10

flag exe_2
description: Build second exe
default: False

executable test-3199-1
main-is: Main.hs
build-depends: base
default-language: Haskell2010

executable test-3199-2
main-is: Main.hs
build-depends: base, ansi-terminal
default-language: Haskell2010

if flag(exe_2)
buildable: True
else
buildable: False

0 comments on commit 005c6ac

Please sign in to comment.