X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fapi%2Ftest_search.c;h=7dae4427513814b06de8b3b912ebde0b6393d20c;hb=4e6078e4660869b9d83223c8ce842ed8dda211ab;hp=9fe04ecd76aeab45370532f2a620c5959cdf248a;hpb=fb791f9a754adf7b26695fdb1ddd0fdee9bf28f9;p=idzebra-moved-to-github.git
diff --git a/test/api/test_search.c b/test/api/test_search.c
index 9fe04ec..7dae442 100644
--- a/test/api/test_search.c
+++ b/test/api/test_search.c
@@ -50,6 +50,7 @@ const char *myrec[] = {
"\n",
"\nMy title xa b c c c a y\n\n" ,
+ "\ntesta1 a2 c a1 a2 a3\n\n" ,
"\n"
" 2107-09-19 00:00:00\n"
@@ -173,8 +174,8 @@ static void tst(int argc, char **argv)
YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=5 title", 2));
/* always-matches relation */
- YAZ_CHECK(tl_query(zh, "@attr 1=_ALLRECORDS @attr 2=103 {ym}", 4));
- YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=103 {x my}", 3));
+ YAZ_CHECK(tl_query(zh, "@attr 1=_ALLRECORDS @attr 2=103 {ym}", 5));
+ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=103 {x my}", 4));
YAZ_CHECK(tl_query_x(zh, "@attr 1=1 @attr 2=103 {x my}", 0, 114));
/* and searches */
@@ -252,6 +253,10 @@ static void tst(int argc, char **argv)
/* exl=0 distance=1 order=1 relation=2 (<=), known, unit=word */
YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 2 k 2 c a", 1));
+ /* exl=0 distance=1 order=1 relation=2 (<=), known, unit=word */
+ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 2 k 2 @prox 0 1 1 2 k 2 a1 a2 a3", 1));
+ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 3 k 2 @prox 0 1 1 3 k 2 a1 a2 a3", 1));
+
/* 3 term @prox test.. */
YAZ_CHECK(tl_query(zh, "@attr 1=1016 \"a b c\"", 1));