1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Few more test fixes

This commit is contained in:
Timothy Clem 2018-04-20 16:30:06 -07:00
parent 9d7a85cbda
commit f96db32268
2 changed files with 8 additions and 8 deletions

View File

@ -161,13 +161,13 @@ type ImportGraphingWithHoles term = ImportGraphing (EvaluatingWithHoles term)
--
-- getPaths exts = fmap fold . globDir (compile . mappend "**/*." <$> exts)
--
--
-- -- Read and parse a file.
-- parseFile :: Parser term -> Maybe FilePath -> FilePath -> IO (Module term)
-- parseFile parser rootDir path = runTask $ do
-- blob <- file path
-- moduleForBlob rootDir blob <$> parse parser blob
--
-- Read and parse a file.
parseFile :: Parser term -> Maybe FilePath -> FilePath -> IO (Module term)
parseFile parser rootDir path = runTask $ do
blob <- file path
moduleForBlob rootDir blob <$> parse parser blob
-- parseFiles :: Parser term -> FilePath -> [FilePath] -> IO [Module term]
-- parseFiles parser rootDir = traverse (parseFile parser (Just rootDir))

View File

@ -16,7 +16,7 @@ spec = parallel $ do
blobPath blob `shouldBe` "semantic.cabal"
it "throws for absent files" $ do
readFile "this file should not exist" Nothing `shouldThrow` anyIOException
readFile (File "this file should not exist" Nothing) `shouldThrow` anyIOException
describe "readBlobPairsFromHandle" $ do
let a = sourceBlob "method.rb" (Just Ruby) "def foo; end"