Add a test for gmsGet/Put

This commit is contained in:
Daniel Gröber 2014-08-12 18:22:28 +02:00
parent 9922cf08e1
commit fa65d7269e
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,8 @@ module Language.Haskell.GhcMod.Monad (
-- ** Conversion
, toGhcModT
-- ** Accessing 'GhcModEnv' and 'GhcModState'
, gmsGet
, gmsPut
, options
, cradle
, getCompilerMode

View File

@ -25,3 +25,8 @@ spec = do
describe "runGhcModT" $
it "complains if the cabal file fails to parse while a sandbox is present" $ withDirectory_ "test/data/broken-cabal" $ do
shouldReturnError $ runD' (gmCradle <$> ask)
describe "gmsGet/Put" $
it "work" $ do
(runD $ gmsPut (GhcModState Intelligent) >> gmsGet)
`shouldReturn` (GhcModState Intelligent)