From 42a1ea0a875c2b10eb40a60a908b062c2276dbaa Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 12 Feb 2013 14:18:19 +0900 Subject: [PATCH] test for Browse. --- ghc-mod.cabal | 1 + test/BrowseSpec.hs | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/BrowseSpec.hs diff --git a/ghc-mod.cabal b/ghc-mod.cabal index 66723f0..d16e984 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -67,6 +67,7 @@ Test-Suite spec Hs-Source-Dirs: test, . Type: exitcode-stdio-1.0 Other-Modules: Expectation + BrowseSpec FlagSpec LangSpec ListSpec diff --git a/test/BrowseSpec.hs b/test/BrowseSpec.hs new file mode 100644 index 0000000..5cebc0b --- /dev/null +++ b/test/BrowseSpec.hs @@ -0,0 +1,14 @@ +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"