1
module PackageTests.BuildDeps.InternalLibrary2.Check where
4
import PackageTests.PackageTester
6
import qualified Data.ByteString.Char8 as C
11
let spec = PackageSpec ("PackageTests" </> "BuildDeps" </> "InternalLibrary2") []
12
let specTI = PackageSpec (directory spec </> "to-install") []
14
unregister "InternalLibrary2"
15
iResult <- cabal_install specTI
16
assertEqual "cabal install should succeed - see to-install/test-log.txt" True (successful iResult)
17
bResult <- cabal_build spec
18
assertEqual "cabal build should succeed - see test-log.txt" True (successful bResult)
19
unregister "InternalLibrary2"
21
(_, _, output) <- run (Just $ directory spec) "dist/build/lemon/lemon" []
22
C.appendFile (directory spec </> "test-log.txt") (C.pack $ "\ndist/build/lemon/lemon\n"++output)
23
assertEqual "executable should have linked with the internal library" "myLibFunc internal" (concat $ lines output)