test case for #118.
This commit is contained in:
parent
ee0cfcc7ce
commit
56b1e14219
@ -21,3 +21,7 @@ spec = do
|
||||
info <- cabalBuildInfo <$> cabalParseFile "test/data/cabalapi.cabal"
|
||||
let infoStr = show info
|
||||
infoStr `shouldBe` "Just (BuildInfo {buildable = True, buildTools = [], cppOptions = [], ccOptions = [], ldOptions = [], pkgconfigDepends = [], frameworks = [], cSources = [], hsSourceDirs = [], otherModules = [ModuleName [\"Browse\"],ModuleName [\"CabalApi\"],ModuleName [\"Cabal\"],ModuleName [\"CabalDev\"],ModuleName [\"Check\"],ModuleName [\"ErrMsg\"],ModuleName [\"Flag\"],ModuleName [\"GHCApi\"],ModuleName [\"GHCChoice\"],ModuleName [\"Gap\"],ModuleName [\"Info\"],ModuleName [\"Lang\"],ModuleName [\"Lint\"],ModuleName [\"List\"],ModuleName [\"Paths_ghc_mod\"],ModuleName [\"Types\"]], defaultLanguage = Nothing, otherLanguages = [], defaultExtensions = [], otherExtensions = [], oldExtensions = [], extraLibs = [], extraLibDirs = [], includeDirs = [], includes = [], installIncludes = [], options = [(GHC,[\"-Wall\"])], ghcProfOptions = [], ghcSharedOptions = [], customFieldsBI = [], targetBuildDepends = []})"
|
||||
|
||||
it "returns Nothing if the cabal file is broken" $ do
|
||||
info <- cabalBuildInfo <$> cabalParseFile "test/data/broken-cabal/broken.cabal"
|
||||
info `shouldBe` Nothing
|
||||
|
1
test/data/broken-cabal/broken.cabal
Normal file
1
test/data/broken-cabal/broken.cabal
Normal file
@ -0,0 +1 @@
|
||||
broken cabal
|
Loading…
Reference in New Issue
Block a user