Un-ignore .bat files
[cabal.git] / cabal-testsuite / PackageTests / BuildDeps / GlobalBuildDepsNotAdditive2 / Check.hs
blob6286d4982f731245f33563ec12ba5ea445be21a2
1 module PackageTests.BuildDeps.GlobalBuildDepsNotAdditive2.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" </> "GlobalBuildDepsNotAdditive2") []
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)