mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
24 lines
809 B
Haskell
24 lines
809 B
Haskell
|
module SemanticSpec where
|
||
|
|
||
|
import Prologue
|
||
|
import Arguments
|
||
|
import Semantic
|
||
|
import Test.Hspec hiding (shouldBe, shouldNotBe, shouldThrow, errorCall)
|
||
|
import Test.Hspec.Expectations.Pretty
|
||
|
import Test.Hspec.LeanCheck
|
||
|
|
||
|
spec :: Spec
|
||
|
spec = parallel $ do
|
||
|
describe "runDiff" $ do
|
||
|
prop "produces diffs for all formats" $
|
||
|
\ encoder -> do
|
||
|
let mode = DiffPaths "test/fixtures/ruby/and-or.A.rb" "test/fixtures/ruby/and-or.B.rb"
|
||
|
output <- runDiff $ DiffArguments encoder mode "" []
|
||
|
output `shouldNotBe` ""
|
||
|
describe "runParse" $ do
|
||
|
prop "produces parse trees for all formats" $
|
||
|
\ renderer -> do
|
||
|
let mode = ParsePaths ["test/fixtures/ruby/and-or.A.rb"]
|
||
|
output <- runParse $ ParseArguments renderer mode False "" []
|
||
|
output `shouldNotBe` ""
|