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:
parent
9d7a85cbda
commit
f96db32268
@ -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))
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user