summary refs log tree commit diff stats
path: root/testing/test_abdl.py
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2019-12-03 23:21:03 -0300
committerSoniEx2 <endermoneymod@gmail.com>2020-01-22 19:46:23 -0300
commit099e8f957f3c969c148e6106bf50787d471c0d04 (patch)
tree9ced95c0441c4572c3b02d88efd203ef95b8b73a /testing/test_abdl.py
parentc055c6ae3d545b928fbb2b77e6f0ddc31fac84f8 (diff)
Add multiple value matches
Diffstat (limited to 'testing/test_abdl.py')
-rw-r--r--testing/test_abdl.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/test_abdl.py b/testing/test_abdl.py
index 080ab3f..4f5241f 100644
--- a/testing/test_abdl.py
+++ b/testing/test_abdl.py
@@ -182,6 +182,10 @@ def test_param(foo, pat):
                     yield {"X": x, "Z": z}
     assert all(LogAndCompare(pat.match(foo), deep(foo)))
 
+def test_basic_value_subtree():
+    matcher = abdl.match("(->foo'foo')(->bar'bar')", {'foo': 1, 'bar': 2})
+    assert list(matcher) == [{'foo': ('foo', 1), 'bar': ('bar', 2)}]
+
 # FIXME
 #@hypothesis.given(objtree, st.text())
 #def test_exhaustive(foo, pat):