Commit 53b9b421 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Port regression/t3199 to cabal-testsuite


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent f0a5b88a
......@@ -652,7 +652,7 @@ printPlan :: Bool -- is dry run
printPlan dryRun verbosity plan sourcePkgDb = case plan of
[] -> return ()
pkgs
| verbosity >= Verbosity.verbose -> putStr $ unlines $
| verbosity >= Verbosity.verbose -> notice verbosity $ unlines $
("In order, the following " ++ wouldWill ++ " be installed:")
: map showPkgAndReason pkgs
| otherwise -> notice verbosity $ unlines $
......
......@@ -62,10 +62,6 @@ Extra-Source-Files:
tests/IntegrationTests/multiple-source/p/p.cabal
tests/IntegrationTests/multiple-source/q/Setup.hs
tests/IntegrationTests/multiple-source/q/q.cabal
tests/IntegrationTests/regression/t3199.sh
tests/IntegrationTests/regression/t3199/Main.hs
tests/IntegrationTests/regression/t3199/Setup.hs
tests/IntegrationTests/regression/t3199/test-3199.cabal
tests/IntegrationTests/regression/t3827.sh
tests/IntegrationTests/regression/t3827/cabal.project
tests/IntegrationTests/regression/t3827/p/P.hs
......
. ./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
name: Cabal
version: 2.0.0.0
build-type: Simple
cabal-version: >= 1.10
library
build-depends: base
default-language: Haskell2010
# cabal sandbox init
Writing a default package environment file to <ROOT>/sandbox.dist/cabal.sandbox.config
Creating a new sandbox at <ROOT>/sandbox.dist/sandbox
# cabal sandbox add-source
# cabal install
Resolving dependencies...
In order, the following would be installed:
Cabal-2.0.0.0 (new version)
import Test.Cabal.Prelude
main = cabalTest $ do
-- 8.0 and up come with sufficiently recent versions of
-- Cabal which don't have this bug.
skipUnless =<< ghcVersionIs (< mkVersion [8,0])
withSandbox $ do
cabal_sandbox "add-source" ["Cabal"]
cabal "install"
-- Ignore the Cabal library that is under test
["--package-db=clear", "--package-db=global"
,"--only-dep", "--dry-run"]
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