$HOME/.cabal is not a cabal file

This commit is contained in:
Daniel Gröber
2014-11-03 00:04:15 +01:00
parent 94a60350c8
commit 833d9ce058
2 changed files with 16 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import Language.Haskell.GhcMod.GhcPkg
#endif
import System.Directory
import System.Environment
import System.FilePath ((</>))
import Test.Hspec
@@ -28,3 +29,7 @@ spec = do
it "returns Nothing if the sandbox config file is broken" $ do
getSandboxDb "test/data/broken-sandbox" `shouldReturn` Nothing
describe "getCabalFiles" $ do
it "doesn't think $HOME/.cabal is a cabal file" $ do
(getCabalFiles =<< getEnv "HOME") `shouldReturn` []