1 import Test
.Cabal
.Prelude
4 -- This package has explicit setup dependencies that do not include Cabal.
5 -- Compilation should fail because Setup.hs imports Distribution.Simple.
6 r
<- fails
$ cabal
' "v2-build" ["custom-setup-without-cabal-defaultMain"]
7 assertRegex
"Should not have been able to import Cabal"
8 "(Could not (find|load) module|Failed to load interface for).*Distribution\\.Simple" r
10 -- TODO: With GHC 8.2, this no longer is displayed
11 -- When using --with-ghc, this message is not necessarily output
12 has_cabal <- hasCabalForGhc
14 assertRegex "It is a member of the hidden package .*Cabal-"
15 "It is a member of the hidden package" r