Migrate the remaining parts of the exposed API to GhcMod a
This commit is contained in:
@@ -10,25 +10,25 @@ import Dir
|
||||
|
||||
spec :: Spec
|
||||
spec = do
|
||||
describe "browse" $ do
|
||||
it "lists up symbols in the module" $ do
|
||||
describe "browse Data.Map" $ do
|
||||
it "contains at least `differenceWithKey'" $ do
|
||||
syms <- runD $ lines <$> browse "Data.Map"
|
||||
syms `shouldContain` ["differenceWithKey"]
|
||||
|
||||
describe "browse -d" $ do
|
||||
it "lists up symbols with type info in the module" $ do
|
||||
describe "browse -d Data.Either" $ do
|
||||
it "contains functions (e.g. `either') including their type signature" $ do
|
||||
syms <- run defaultOptions { detailed = True }
|
||||
$ lines <$> browse "Data.Either"
|
||||
syms `shouldContain` ["either :: (a -> c) -> (b -> c) -> Either a b -> c"]
|
||||
|
||||
it "lists up data constructors with type info in the module" $ do
|
||||
it "contains type constructors (e.g. `Left') including their type signature" $ do
|
||||
cradle <- findCradle
|
||||
syms <- run defaultOptions { detailed = True}
|
||||
$ lines <$> browse "Data.Either"
|
||||
syms `shouldContain` ["Left :: a -> Either a b"]
|
||||
|
||||
describe "browse local" $ do
|
||||
it "lists symbols in a local module" $ do
|
||||
describe "`browse' in a project directory" $ do
|
||||
it "lists symbols defined in a a local module (e.g. `Baz.baz)" $ do
|
||||
withDirectory_ "test/data" $ do
|
||||
syms <- runID $ lines <$> browse "Baz"
|
||||
syms `shouldContain` ["baz"]
|
||||
|
||||
Reference in New Issue
Block a user