1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Test that multiple alternatives are matched against.

This commit is contained in:
Rob Rix 2017-04-06 14:25:21 -04:00
parent ac8d473e8e
commit fe55642e6b

View File

@ -11,3 +11,6 @@ spec = do
describe "stepAssignment" $ do
it "matches nodes" $ do
stepAssignment comment [Rose (Node Comment "hello") []] `shouldBe` Just ([], wrapU (Comment.Comment "hello") :: Program Syntax ())
it "attempts multiple alternatives" $ do
stepAssignment (if' <|> comment) [Rose (Node Comment "hello") []] `shouldBe` Just ([], wrapU (Comment.Comment "hello") :: Program Syntax ())