Make failing test for GHC HEAD ghc-pkg dump parsing

This commit is contained in:
Callum Rogers 2015-12-13 19:17:36 +00:00
parent 8e5b5f366a
commit 95f80c4098
2 changed files with 1176 additions and 0 deletions

View file

@ -160,6 +160,36 @@ spec = do
, dpHaddock = ()
, dpIsExposed = True
}
it "ghc HEAD" $ do
ghcBoot:_ <- runResourceT
$ CB.sourceFile "test/package-dump/ghc-head.txt"
=$= decodeUtf8
$$ conduitDumpPackage
=$ CL.consume
ghcPkgId <- parseGhcPkgId "ghc-boot-0.0.0.0"
pkgId <- parsePackageIdentifier "ghc-boot-0.0.0.0"
depends <- mapM parseGhcPkgId
[ "base-4.9.0.0"
, "binary-0.7.5.0"
, "bytestring-0.10.7.0"
, "directory-1.2.5.0"
, "filepath-1.4.1.0"
]
ghcBoot `shouldBe` DumpPackage
{ dpGhcPkgId = ghcPkgId
, dpPackageIdent = pkgId
, dpLibDirs =
["/opt/ghc/head/lib/ghc-7.11.20151213/ghc-boot-0.0.0.0"]
, dpHaddockInterfaces = ["/opt/ghc/head/share/doc/ghc/html/libraries/ghc-boot-0.0.0.0/ghc-boot.haddock"]
, dpHaddockHtml = Just "/opt/ghc/head/share/doc/ghc/html/libraries/ghc-boot-0.0.0.0"
, dpDepends = depends
, dpLibraries = ["HSghc-boot-0.0.0.0"]
, dpHasExposedModules = True
, dpProfiling = ()
, dpHaddock = ()
, dpIsExposed = True
}
it "ghcPkgDump + addProfiling + addHaddock" $ (id :: IO () -> IO ()) $ runNoLoggingT $ do
menv' <- getEnvOverride buildPlatform

File diff suppressed because it is too large Load diff