Add “Ignore warning” option to cabal check
[cabal.git] / cabal-testsuite / PackageTests / UniqueIPID / setup.test.hs
blobd084e8c198927ba7b55f6af9a7873ae559967612
1 import Test.Cabal.Prelude
2 import Data.List
3 -- Test that setup computes different IPIDs when dependencies change
4 main = setupAndCabalTest $ do
5 withPackageDb $ do
6 withDirectory "P1" $ setup "configure" ["--disable-deterministic"]
7 withDirectory "P2" $ setup "configure" ["--disable-deterministic"]
8 withDirectory "P1" $ setup "build" []
9 withDirectory "P1" $ setup "build" [] -- rebuild should work
10 recordMode DoNotRecord $ do
11 r1 <- withDirectory "P1" $ setup' "register" ["--print-ipid", "--inplace"]
12 withDirectory "P2" $ setup "build" []
13 r2 <- withDirectory "P2" $ setup' "register" ["--print-ipid", "--inplace"]
14 let exIPID s = takeWhile (/= '\n') $
15 head . filter (isPrefixOf $ "UniqueIPID-0.1-") $ (tails s)
16 assertNotEqual "ipid match" (exIPID $ resultOutput r1) (exIPID $ resultOutput r2)