Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 9a75daf

Browse files
committed
Test cabal and stack exec are accesible
1 parent 16ce3d2 commit 9a75daf

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/unit/CabalHelperSpec.hs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{-# LANGUAGE OverloadedStrings #-}
22
module CabalHelperSpec where
33

4+
import Data.Maybe (isJust)
45
import Haskell.Ide.Engine.Cradle
56
import Test.Hspec
67
import System.FilePath
7-
import System.Directory (getCurrentDirectory, removeFile)
8+
import System.Directory (findExecutable, getCurrentDirectory, removeFile)
89
import TestUtils
910

1011
rootPath :: FilePath -> FilePath
@@ -27,6 +28,13 @@ simpleStackPath cwd = rootPath cwd </> "simple-stack"
2728

2829
spec :: Spec
2930
spec = beforeAll_ setupStackFiles $ do
31+
describe "stack and cabal executables should be accesible" $ do
32+
it "cabal is accesible" $ do
33+
stack <- findExecutable "cabal"
34+
stack `shouldSatisfy` isJust
35+
it "stack is accesible" $ do
36+
cabal <- findExecutable "stack"
37+
cabal `shouldSatisfy` isJust
3038
describe "cabal-helper spec" $ do
3139
describe "find cabal entry point spec" findCabalHelperEntryPointSpec
3240
describe "cradle discovery" cabalHelperCradleSpec

0 commit comments

Comments
 (0)