custom_setup_without_Cabal_doesnt_allow_Cabal_import.sh 543 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
. ./common.sh
cd custom-setup-without-cabal-defaultMain

# This package has explicit setup dependencies that do not include Cabal.
# Compilation should fail because Setup.hs imports Distribution.Simple.
! cabal new-build custom-setup-without-cabal-defaultMain > output 2>&1
cat output
grep -q "\(Could not find module\|Failed to load interface for\).*Distribution\\.Simple" output \
    || die "Should not have been able to import Cabal"

grep -q "It is a member of the hidden package .*Cabal-" output \
    || die "Cabal should be available"