Add test cases that reproduce #7241.
[cabal.git] / cabal-testsuite / PackageTests / Backpack / Includes2 / setup-per-component.test.hs
blobe94d2018d7cbf16813a12dc28479ab341421551a
1 import Test.Cabal.Prelude
2 main = setupTest $ do
3 -- No cabal test because per-component is broken with it
4 skipUnlessGhcVersion ">= 8.1"
5 ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*"
6 expectBrokenIf ghc 7987 $
7 withPackageDb $
8 withDirectory "Includes2" $ do
9 let setup_install' args = setup_install_with_docs args
10 setup_install' ["mylib", "--cid", "mylib-0.1.0.0"]
11 setup_install' ["mysql", "--cid", "mysql-0.1.0.0"]
12 setup_install' ["postgresql", "--cid", "postgresql-0.1.0.0"]
13 setup_install' ["mylib", "--cid", "mylib-0.1.0.0",
14 "--instantiate-with", "Database=mysql-0.1.0.0:Database.MySQL"]
15 setup_install' ["mylib", "--cid", "mylib-0.1.0.0",
16 "--instantiate-with", "Database=postgresql-0.1.0.0:Database.PostgreSQL"]
17 setup_install' ["Includes2"]
18 setup_install' ["exe"]
19 runExe' "exe" [] >>= assertOutputContains "minemysql minepostgresql"