aboutsummaryrefslogtreecommitdiffstats
path: root/test/t_queryparse.py
blob: ac9cf24c6b1d96c0bc5c6ba702a01eaa6a3bfba6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python3
import sys
sys.path.insert(0, "../")
import queryparse

def f(x):
	print(x)
	print(queryparse.parse(x))

f(["x", "OR", "y"])
f(["x", "y", "OR", "a", "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(["~~internal-*", "~-Application*", "NOT", "~~*xyz*"])