mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Test that matches are performed in sequence.
This commit is contained in:
parent
fe55642e6b
commit
761992e1fe
@ -14,3 +14,6 @@ spec = do
|
||||
|
||||
it "attempts multiple alternatives" $ do
|
||||
stepAssignment (if' <|> comment) [Rose (Node Comment "hello") []] `shouldBe` Just ([], wrapU (Comment.Comment "hello") :: Program Syntax ())
|
||||
|
||||
it "matches in sequence" $ do
|
||||
stepAssignment ((,) <$> comment <*> comment) [Rose (Node Comment "hello") [], Rose (Node Comment "world") []] `shouldBe` Just ([], (wrapU (Comment.Comment "hello"), wrapU (Comment.Comment "world")) :: (Program Syntax (), Program Syntax ()))
|
||||
|
Loading…
Reference in New Issue
Block a user