<commit_before>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"<commit_msg>Adding a test case for Browse.<commit_after>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"

    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"
{'fraction_non_alphanumeric': 0.08792270531400966, 'fraction_numerical': 0.0, 'mean_word_length': 2.9242424242424243, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6770888', 'n_tokens_mistral': 307, 'n_tokens_neox': 291, 'n_words': 109}