1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
module Cabal.PathsSpec (spec) where
import Imports
import Test.Hspec
import System.Directory
import Cabal ()
import Cabal.Paths
spec :: Spec
spec = do
describe "paths" $ do
it "returns the path to 'ghc'" $ do
(paths "cabal" [] >>= doesFileExist . ghc) `shouldReturn` True
it "returns the path to 'ghc-pkg'" $ do
(paths "cabal" [] >>= doesFileExist . ghcPkg) `shouldReturn` True
it "returns the path to Cabal's cache directory" $ do
(paths "cabal" [] >>= doesDirectoryExist . cache) `shouldReturn` True
|