2014-07-17 14:16:12 +00:00
|
|
|
module FindSpec where
|
|
|
|
|
|
|
|
import Language.Haskell.GhcMod.Find
|
2015-08-14 07:50:20 +00:00
|
|
|
import Control.Monad
|
2014-07-17 14:16:12 +00:00
|
|
|
import Test.Hspec
|
2014-08-28 09:54:01 +00:00
|
|
|
import TestUtils
|
2014-07-17 14:16:12 +00:00
|
|
|
|
|
|
|
spec :: Spec
|
|
|
|
spec = do
|
|
|
|
describe "db <- loadSymbolDb" $ do
|
|
|
|
it "lookupSymbol' db \"head\" contains at least `Data.List'" $ do
|
2015-08-14 07:50:20 +00:00
|
|
|
db <- runD $ loadSymbolDb =<< (cradleTempDir `liftM` cradle)
|
2015-06-01 15:10:37 +00:00
|
|
|
lookupSym "head" db `shouldContain` [ModuleString "Data.List"]
|