projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
def92a7
)
Add more complex query to test
author
Dennis Schafroth
<dennis@indexdata.com>
Mon, 23 Sep 2013 07:27:01 +0000
(09:27 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Mon, 23 Sep 2013 07:27:01 +0000
(09:27 +0200)
test/test_rpn2cql.c
patch
|
blob
|
history
diff --git
a/test/test_rpn2cql.c
b/test/test_rpn2cql.c
index
b7a5114
..
9a717c1
100644
(file)
--- a/
test/test_rpn2cql.c
+++ b/
test/test_rpn2cql.c
@@
-59,6
+59,11
@@
static void tst1(void)
YAZ_CHECK(compare(ct, "abc", "abc"));
YAZ_CHECK(compare(ct, "\"a b c\"", "\"a b c\""));
YAZ_CHECK(compare(ct, "@and a b", "a and b"));
YAZ_CHECK(compare(ct, "abc", "abc"));
YAZ_CHECK(compare(ct, "\"a b c\"", "\"a b c\""));
YAZ_CHECK(compare(ct, "@and a b", "a and b"));
+ YAZ_CHECK(compare(ct, "@or a @and b c", "a or (b and c)"));
+ YAZ_CHECK(compare(ct, "@or @and a b @and c d", "(a and b) or (c and d)"));
+ YAZ_CHECK(compare(ct, "@or @or a b @or c d", "(a or b) or (c or d)"));
+ YAZ_CHECK(compare(ct, "@and @and a b @and c d", "(a and b) and (c and d)"));
+
YAZ_CHECK(compare(ct, "@attr 1=field abc", "field=abc"));
YAZ_CHECK(compare(ct, "@attr 1=4 abc", 0)); /* should fail */
YAZ_CHECK(compare(ct, "@attr 1=field abc", "field=abc"));
YAZ_CHECK(compare(ct, "@attr 1=4 abc", 0)); /* should fail */