Add a test for gmsGet/Put
This commit is contained in:
parent
9922cf08e1
commit
fa65d7269e
@ -23,6 +23,8 @@ module Language.Haskell.GhcMod.Monad (
|
|||||||
-- ** Conversion
|
-- ** Conversion
|
||||||
, toGhcModT
|
, toGhcModT
|
||||||
-- ** Accessing 'GhcModEnv' and 'GhcModState'
|
-- ** Accessing 'GhcModEnv' and 'GhcModState'
|
||||||
|
, gmsGet
|
||||||
|
, gmsPut
|
||||||
, options
|
, options
|
||||||
, cradle
|
, cradle
|
||||||
, getCompilerMode
|
, getCompilerMode
|
||||||
|
@ -25,3 +25,8 @@ spec = do
|
|||||||
describe "runGhcModT" $
|
describe "runGhcModT" $
|
||||||
it "complains if the cabal file fails to parse while a sandbox is present" $ withDirectory_ "test/data/broken-cabal" $ do
|
it "complains if the cabal file fails to parse while a sandbox is present" $ withDirectory_ "test/data/broken-cabal" $ do
|
||||||
shouldReturnError $ runD' (gmCradle <$> ask)
|
shouldReturnError $ runD' (gmCradle <$> ask)
|
||||||
|
|
||||||
|
describe "gmsGet/Put" $
|
||||||
|
it "work" $ do
|
||||||
|
(runD $ gmsPut (GhcModState Intelligent) >> gmsGet)
|
||||||
|
`shouldReturn` (GhcModState Intelligent)
|
||||||
|
Loading…
Reference in New Issue
Block a user