diff --git a/test/integration/tests/443-specify-path/Main.hs b/test/integration/tests/443-specify-path/Main.hs index 621bf652f6..572e1f7e6a 100644 --- a/test/integration/tests/443-specify-path/Main.hs +++ b/test/integration/tests/443-specify-path/Main.hs @@ -1,27 +1,30 @@ import StackTest import System.Directory import System.FilePath +import System.Info (os) main :: IO () main = do + let ext = if os == "mingw32" then ".exe" else "" + -- install in relative path createDirectory "bin" stack ["--local-bin-path", "./bin", "install" , "happy"] - doesExist "./bin/happy" + doesExist ("./bin/happy" ++ ext) -- Default install -- This seems to fail due to direcory being cleaned up, -- a manual test of the default stack install is required -- defaultDir <- getAppUserDataDirectory "local" -- stack ["install", "happy"] - -- doesExist (defaultDir ++ "/bin/happy") + -- doesExist (defaultDir ++ "/bin/happy" ++ ext) -- install in current dir stack ["--local-bin-path", ".", "install", "happy" ] - doesExist "happy" + doesExist ("happy" ++ ext) -- install in absolute path tmpDirectory <- fmap ( "absolute-bin") getCurrentDirectory createDirectory tmpDirectory stack ["--local-bin-path", tmpDirectory, "install", "happy" ] - doesExist (tmpDirectory "happy") + doesExist (tmpDirectory ("happy" ++ ext))