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

Port custom-setup/installs_Cabal_as_setup_dep to new test suite



Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent c4b22e9f
# Regression test for issue #3436
. ./common.sh
cabal sandbox init
cabal install ./Cabal-99998
cabal sandbox add-source Cabal-99999
# Install custom-setup, which has a setup dependency on Cabal-99999.
# cabal should build the setup script with Cabal-99999, but then
# configure should fail because Setup just prints an error message
# imported from Cabal and exits.
! cabal install custom-setup/ > output 2>&1
cat output
grep -q "This is Cabal-99999" output || die "Expected output from Cabal-99999"
import Test.Cabal.Prelude
main = cabalTest $ do
-- NB: This test doesn't really test #3436, because Cabal-99998
-- isn't in the system database and thus we can't see if the
-- depsolver incorrectly chooses it. Worth fixing if we figure
-- out how to simulate the "global" database without root.
r <- fails $ cabal' "new-build" []
assertOutputContains "This is Cabal-99999" r
import Test.Cabal.Prelude
main = cabalTest $ do
withSandbox $ do
cabal "install" ["./Cabal-99998"]
cabal_sandbox "add-source" ["Cabal-99999"]
r <- fails $ cabal' "install" ["custom-setup/"]
assertOutputContains "This is Cabal-99999" r
Supports Markdown
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