Skip to content

Commit 95f80c4

Browse files
committed
Make failing test for GHC HEAD ghc-pkg dump parsing
1 parent 8e5b5f3 commit 95f80c4

2 files changed

Lines changed: 1176 additions & 0 deletions

File tree

src/test/Stack/PackageDumpSpec.hs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,36 @@ spec = do
160160
, dpHaddock = ()
161161
, dpIsExposed = True
162162
}
163+
it "ghc HEAD" $ do
164+
ghcBoot:_ <- runResourceT
165+
$ CB.sourceFile "test/package-dump/ghc-head.txt"
166+
=$= decodeUtf8
167+
$$ conduitDumpPackage
168+
=$ CL.consume
169+
ghcPkgId <- parseGhcPkgId "ghc-boot-0.0.0.0"
170+
pkgId <- parsePackageIdentifier "ghc-boot-0.0.0.0"
171+
depends <- mapM parseGhcPkgId
172+
[ "base-4.9.0.0"
173+
, "binary-0.7.5.0"
174+
, "bytestring-0.10.7.0"
175+
, "directory-1.2.5.0"
176+
, "filepath-1.4.1.0"
177+
]
178+
ghcBoot `shouldBe` DumpPackage
179+
{ dpGhcPkgId = ghcPkgId
180+
, dpPackageIdent = pkgId
181+
, dpLibDirs =
182+
["/opt/ghc/head/lib/ghc-7.11.20151213/ghc-boot-0.0.0.0"]
183+
, dpHaddockInterfaces = ["/opt/ghc/head/share/doc/ghc/html/libraries/ghc-boot-0.0.0.0/ghc-boot.haddock"]
184+
, dpHaddockHtml = Just "/opt/ghc/head/share/doc/ghc/html/libraries/ghc-boot-0.0.0.0"
185+
, dpDepends = depends
186+
, dpLibraries = ["HSghc-boot-0.0.0.0"]
187+
, dpHasExposedModules = True
188+
, dpProfiling = ()
189+
, dpHaddock = ()
190+
, dpIsExposed = True
191+
}
192+
163193

164194
it "ghcPkgDump + addProfiling + addHaddock" $ (id :: IO () -> IO ()) $ runNoLoggingT $ do
165195
menv' <- getEnvOverride buildPlatform

0 commit comments

Comments
 (0)