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

Move corpus tests into their own dir

This commit is contained in:
Timothy Clem 2018-04-18 13:33:17 -07:00
parent a89329eafa
commit ea0afa1747
1975 changed files with 8 additions and 13 deletions

View File

@ -1,27 +1,22 @@
module Integration.Spec (spec) where
import Data.Foldable (find, traverse_)
import Data.Foldable (find, traverse_, for_)
import Data.List (union, concat, transpose)
import qualified Data.ByteString as B
import System.FilePath.Glob
import System.FilePath.Posix
import SpecHelpers
languages :: [FilePath]
languages = ["go", "javascript", "python", "ruby", "typescript"]
spec :: Spec
spec = parallel $ do
it "lists example fixtures" $ do
examples "test/fixtures/go/" `shouldNotReturn` []
examples "test/fixtures/javascript/" `shouldNotReturn` []
examples "test/fixtures/python/" `shouldNotReturn` []
examples "test/fixtures/ruby/" `shouldNotReturn` []
examples "test/fixtures/typescript/" `shouldNotReturn` []
describe "go" $ runTestsIn "test/fixtures/go/" []
describe "javascript" $ runTestsIn "test/fixtures/javascript/" []
describe "python" $ runTestsIn "test/fixtures/python/" []
describe "ruby" $ runTestsIn "test/fixtures/ruby/" []
describe "typescript" $ runTestsIn "test/fixtures/typescript/" []
for_ languages $ \language -> do
let dir = "test/fixtures" </> language </> "corpus"
it (language <> " corpus exists") $ examples dir `shouldNotReturn` []
describe (language <> " corpus") $ runTestsIn dir []
where
runTestsIn :: FilePath -> [(FilePath, String)] -> SpecWith ()

Some files were not shown because too many files have changed in this diff Show More