forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
59 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Helper to run Cabal | ||
cabal() { | ||
"$CABAL" $CABAL_ARGS "$@" | ||
} | ||
|
||
die() { | ||
echo "die: $@" | ||
exit 1 | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
. ./common.sh | ||
|
||
if [[ `ghc --numeric-version` =~ "7\\." ]]; then | ||
cd t3199 | ||
tmpfile=$(mktemp /tmp/cabal-t3199.XXXXXX) | ||
cabal sandbox init | ||
cabal sandbox add-source ../../../../../Cabal | ||
cabal install --package-db=clear --package-db=global --only-dep --dry-run > $tmpfile | ||
grep -q "the following would be installed" $tmpfile || die "Should've installed Cabal" | ||
grep -q Cabal $tmpfile || die "Should've installed Cabal" | ||
rm $tmpfile | ||
fi |
4 changes: 4 additions & 0 deletions
4
cabal-install/tests/IntegrationTests/regression/t3199/Main.hs
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Main where | ||
|
||
main :: IO () | ||
main = putStrLn "Hello, Haskell!" |
2 changes: 2 additions & 0 deletions
2
cabal-install/tests/IntegrationTests/regression/t3199/Setup.hs
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Distribution.Simple | ||
main = defaultMain |
27 changes: 27 additions & 0 deletions
27
cabal-install/tests/IntegrationTests/regression/t3199/test-3199.cabal
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 |
---|---|---|
@@ -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 |