1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 22:28:10 +03:00
semantic/semantic-ruby/test/PreciseTest.hs

21 lines
601 B
Haskell
Raw Normal View History

{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
module Main (main) where
import TreeSitter.Ruby
2020-02-14 19:33:01 +03:00
import AST.TestHelpers
2020-02-07 00:30:39 +03:00
import AST.Unmarshal
import qualified Language.Ruby.AST as Rb
import qualified System.Path as Path
import Test.Tasty
main :: IO ()
main
= Path.absDir <$> Rb.getTestCorpusDir
>>= readCorpusFiles'
>>= traverse (testCorpus parse)
>>= defaultMain . tests
where parse = parseByteString @Rb.Program @() tree_sitter_ruby
tests :: [TestTree] -> TestTree
tests = testGroup "tree-sitter-ruby corpus tests"