(cabal check) Add "Version signatures" test
[cabal.git] / cabal-testsuite / PackageTests / BuildDeps / GlobalBuildDepsNotAdditive1 / Check.hs
blob4dde5c403aa277e739131df471af34e0b55eebc2
1 module PackageTests.BuildDeps.GlobalBuildDepsNotAdditive1.Check where
3 import Test.Tasty.HUnit
4 import PackageTests.PackageTester
5 import System.FilePath
6 import Data.List
7 import Control.Exception
8 import Prelude hiding (catch)
11 suite :: FilePath -> Assertion
12 suite ghcPath = do
13 let spec = PackageSpec ("PackageTests" </> "BuildDeps" </> "GlobalBuildDepsNotAdditive1") []
14 result <- cabal_build spec ghcPath
16 assertEqual "cabal build should fail - see test-log.txt" False (successful result)
17 let sb = "Could not find module `Prelude'"
18 assertBool ("cabal output should be "++show sb) $
19 sb `isInfixOf` outputText result
20 `catch` \exc -> do
21 putStrLn $ "Cabal result was "++show result
22 throwIO (exc :: SomeException)