1 import System
.Directory
2 import Test
.Cabal
.Prelude
4 -- Test that invalid unicode in pkg-config output doesn't trip up cabal very much
7 sh
<- fmap takeDirectory
<$> liftIO
(findExecutable
"sh")
9 Nothing
-> skip
"no sh"
11 let sh
'' = concatMap (\c
-> case c
of
14 void
$ shell
"sed" [ "-i", "-e", "s/FINDSH/" <> sh
'' <> "/g", "pkg-config.shim"]
15 cdir
<- testCurrentDir `
fmap` getTestEnv
16 res
<- cabal
' "v2-build" ["--extra-prog-path="++cdir
, "-v2"]
17 assertOutputContains
"Some pkg-config packages have names containing invalid unicode: or" res