ghc-mod/test/BrowseSpec.hs

20 lines
622 B
Haskell
Raw Normal View History

2013-02-12 05:18:19 +00:00
module BrowseSpec where
import Control.Applicative
import Test.Hspec
import Browse
import Expectation
import Types
spec :: Spec
spec = do
describe "browseModule" $ do
it "lists up symbols in the module" $ do
syms <- lines <$> browseModule defaultOptions "Data.Map"
syms `shouldContain` "differenceWithKey"
2013-03-01 00:46:17 +00:00
describe "browseModule -d" $ do
it "lists up symbols with type info in the module" $ do
syms <- lines <$> browseModule defaultOptions { detailed = True } "Data.Either"
syms `shouldContain` "either :: (a -> c) -> (b -> c) -> Either a b -> c"