Add test cases that reproduce #7241.
[cabal.git] / cabal-testsuite / PackageTests / HaddockBuildDepends / cabal.test.hs
blob28821c5e858448a23cfa11a3a05fe8968490a3ce
1 import Test.Cabal.Prelude
4 main = cabalTest . withRepo "repo" $ do
5 cabal "build" ["--enable-documentation"]
7 env <- getTestEnv
8 let storeDir = testCabalDir env </> "store"
10 -- Check properties of executable component
11 libDir <- liftIO $ findDependencyInStore storeDir "exe"
12 -- Documentation is enabled..
13 assertFileDoesContain (libDir </> "cabal-hash.txt") "documentation: True"
14 -- But not built
15 shouldDirectoryNotExist ( libDir </> "share" </> "doc" )
17 -- Check properties of library
18 libDir <- liftIO $ findDependencyInStore storeDir "lib"
19 -- Documentation is enabled..
20 assertFileDoesContain (libDir </> "cabal-hash.txt") "documentation: True"
21 -- and has been built
22 shouldDirectoryExist ( libDir </> "share" </> "doc" )