1 import Test
.Cabal
.Prelude
3 import Control
.Monad
.IO.Class
4 import System
.Directory
6 -- Test to see if --gen-pkg-config works.
7 main
= setupAndCabalTest
$ do
12 let dir
= "pkg-config.bak"
13 setup
"register" ["--gen-pkg-config=" ++ dir
]
14 -- Infelicity! Does not respect CWD.
16 let cwd
= testCurrentDir env
17 notHidden
= not . isHidden
18 isHidden name
= "." `
isPrefixOf` name
19 confs
<- fmap (sort . filter notHidden
)
20 . liftIO
$ getDirectoryContents (cwd
</> dir
)
21 forM_ confs
$ \conf
-> ghcPkg
"register" [cwd
</> dir
</> conf
]
23 -- Make sure we can see p
24 withDirectory
"r" $ setup_install
[]