Skip to content

Commit

Permalink
Fix 443-specify-path integration test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
borsboom committed Aug 11, 2015
1 parent 88d20ce commit 385332d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions 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))

0 comments on commit 385332d

Please sign in to comment.