mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
Test that content assignment produces nodes’ content.
This commit is contained in:
parent
0cc5c84706
commit
c2a2b0b32b
@ -24,6 +24,10 @@ spec = do
|
||||
it "matches nodes with the same symbol" $
|
||||
runAssignment red [ast Red "hello" []] `shouldBe` Just ([], Out "hello")
|
||||
|
||||
describe "content" $ do
|
||||
it "produces the node’s content" $
|
||||
snd <$> runAssignment content [ Rose (Node () "hi") [] ] `shouldBe` Just "hi"
|
||||
|
||||
describe "children" $ do
|
||||
it "advances past the current node" $
|
||||
fst <$> runAssignment (children (pure (Out ""))) [ast Red "a" []] `shouldBe` Just []
|
||||
|
Loading…
Reference in New Issue
Block a user