1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00
semantic/semantic-ruby/test/PreciseTest.hs

21 lines
600 B
Haskell
Raw Normal View History

{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
module Main (main) where
2020-02-07 00:30:39 +03:00
import AST.Test
import AST.Unmarshal
import qualified Language.Ruby.AST as Rb
import Language.Ruby.Grammar
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"