mirror of
https://github.com/github/semantic.git
synced 2024-12-29 01:42:43 +03:00
Test that assignment continues after children assignments.
This commit is contained in:
parent
c2482a0610
commit
b1b1d2bd2f
@ -53,6 +53,15 @@ spec = do
|
||||
`shouldBe`
|
||||
Just ([], "1")
|
||||
|
||||
it "continues after children" $ do
|
||||
runAssignment
|
||||
(many (rule 'A' *> children (rule 'B' *> content)
|
||||
<|> rule 'C' *> content))
|
||||
[ ast 'A' "" [ ast 'B' "B" [] ]
|
||||
, ast 'C' "C" [] ]
|
||||
`shouldBe`
|
||||
Just ([], ["B", "C"])
|
||||
|
||||
ast :: grammar -> ByteString -> [AST grammar] -> AST grammar
|
||||
ast g s c = Rose (Node g s) c
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user