aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2021-07-26 14:10:15 -0400
committerGravatar - 2021-07-26 22:55:59 -0400
commitf963aaeddbfe248a7b4a5f45a9c72a6cadb7bfe3 (patch)
tree5d051f1ea89049a551b88bad814ca914f9833c91 /test
parentgitea wants .md suffixes for web rendering (diff)
queryparse: collect literals into set and return it
Diffstat (limited to 'test')
-rwxr-xr-xtest/t_queryparse.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/t_queryparse.py b/test/t_queryparse.py
index ac9cf24..df21639 100755
--- a/test/t_queryparse.py
+++ b/test/t_queryparse.py
@@ -5,12 +5,16 @@ import queryparse
def f(x):
print(x)
- print(queryparse.parse(x))
+ v,lits = queryparse.parse(x)
+ print(v)
+ print(lits)
+ print()
f(["x", "OR", "y"])
-f(["x", "y", "OR", "a", "b"])
+f(["x", "y", "OR", "x", "b"])
f(["x", "y", "z", "w"])
f(["NOT", "x", "OR", "y"])
f(["NOT", "[", "x", "y", "z", "]"])
-f(["x", "y", "NOT", "z", "[", "a", "OR", "b", "]"])
+f(["x", "y", "NOT", "z", "[", "a", "OR", "b", "]", "c"])
+f(["x", "y", "z", "OR", "NOT", "x", "a", "z"])
f(["~~internal-*", "~-Application*", "NOT", "~~*xyz*"])