Merge pull request #9898 from haskell/mergify/bp/3.12/pr-9865
[cabal.git] / cabal-testsuite / PackageTests / NewBuild / T4288 / cabal.test.hs
blob3e3b8de853e5b5109538e3f34c8841bb5f2bfaeb
1 import Test.Cabal.Prelude
3 -- This test is similar to the simplified example in issue #4288. The package's
4 -- setup script only depends on base and setup-helper. setup-helper exposes a
5 -- function that is a wrapper for Cabal's defaultMain (similar to
6 -- cabal-doctest). This test builds the package to check that the flags passed
7 -- to the setup script are compatible with the version of Cabal that it depends
8 -- on, even though Cabal is only a transitive dependency.
9 main = cabalTest $ do
10 skipUnless "no v2-build compatible boot-Cabal" =<< hasNewBuildCompatBootCabal
11 r <- recordMode DoNotRecord $ cabal' "v2-build" ["T4288"]
12 assertOutputContains "This is setup-helper-1.0." r
13 assertOutputContains
14 ("In order, the following will be built: "
15 ++ " - setup-helper-1.0 (lib:setup-helper) (first run) "
16 ++ " - T4288-1.0 (lib:T4288) (first run)")