Commit 17c9c033 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

I was wrong, the test was correct before.

rolling back:

Mon Oct  5 17:32:02 BST 2009  Stephen Blackheath <grossly.sensitive.stephen@blacksapphire.com>
  * Fix test case InternalLibrary4 on account of a change in Cabal's behaviour.

    M ./tests/PackageTests/BuildDeps/InternalLibrary4/Check.hs -5 +4
parent beb630a6
......@@ -3,7 +3,7 @@ module PackageTests.BuildDeps.InternalLibrary4.Check where
import Test.HUnit
import PackageTests.PackageTester
import System.FilePath
import Data.List
import qualified Data.ByteString.Char8 as C
suite :: Test
......@@ -15,9 +15,10 @@ suite = TestCase $ do
iResult <- cabal_install specTI
assertEqual "cabal install should succeed - see to-install/test-log.txt" True (successful iResult)
bResult <- cabal_build spec
assertEqual "cabal build should fail - see test-log.txt" False (successful bResult)
assertEqual "cabal build should succeed - see test-log.txt" True (successful bResult)
unregister "InternalLibrary4"
assertEqual "error should say 'cannot satisfy dependency InternalLibrary4 >=0.2'" True $
"cannot satisfy dependency InternalLibrary4 >=0.2" `isInfixOf` (intercalate " " $ lines $ outputText bResult)
(_, _, output) <- run (Just $ directory spec) "dist/build/lemon/lemon" []
C.appendFile (directory spec </> "test-log.txt") (C.pack $ "\ndist/build/lemon/lemon\n"++output)
assertEqual "executable should have linked with the installed library" "myLibFunc installed" (concat $ lines output)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment