1 import Test
.Cabal
.Prelude
2 import System
.Directory
4 main
= setupAndCabalTest
$ do
6 sh
<- fmap takeDirectory
<$> liftIO
(findExecutable
"sh")
8 Nothing
-> skip
"no sh"
10 let sh
'' = concatMap (\c
-> case c
of
13 void
$ shell
"sed" [ "-i", "-e", "s/FINDSH/" <> sh
'' <> "/g", "bin/ghc-7.10.shim", "bin/ghc-pkg-ghc-7.10.shim"]
15 then withSymlink
"bin/ghc-7.10.exe" "ghc.exe" . withSymlink
"bin/ghc-7.10.shim" "ghc.shim" . withSymlink
"bin/ghc-7.10" "ghc"
16 else withSymlink
"bin/ghc-7.10" "ghc") $ do
18 let cwd
= testCurrentDir env
19 ghc_path
<- programPathM ghcProgram
20 r
<- withEnv
[("WITH_GHC", Just ghc_path
)]
21 . fails
$ setup
' "configure" ["-w", cwd
</> if isWindows
then "ghc.exe" else "ghc"]
22 assertOutputContains
"is version 9999999" r