X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ftest_search.c;h=55219f97d7fd7bc56a2c7214a5905eea2b2edcde;hb=d46ace3ea1c666fea65433fddfc493594a7aaddc;hp=54fe529469dbd89420e8ea95c3ade6e5221f4ac8;hpb=965cbd297cf8de73cfe01d55983b8161ae7cf67e;p=idzebra-moved-to-github.git
diff --git a/test/api/test_search.c b/test/api/test_search.c
index 54fe529..55219f9 100644
--- a/test/api/test_search.c
+++ b/test/api/test_search.c
@@ -30,8 +30,9 @@ const char *myrec[] = {
" -102 \n"
" 49 \n"
" 31 \n"
- " "
+ " \n"
"\n",
+
"\nMy x title\n"
" second test with two coord sets\n"
" \n"
@@ -45,9 +46,15 @@ const char *myrec[] = {
" -108 \n"
" 41 \n"
" 25 \n"
- " "
+ " \n"
"\n",
+
"\nMy title x\n\n" ,
+
+ "\n"
+ " 2107-09-19 00:00:00\n"
+ "\n"
+ ,
0} ;
static void tst(int argc, char **argv)
@@ -155,7 +162,7 @@ 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}", 3));
+ 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_x(zh, "@attr 1=1 @attr 2=103 {x my}", 0, 114));
@@ -313,7 +320,19 @@ static void tst(int argc, char **argv)
/* N=41 and N=49 get only rec2 */
YAZ_CHECK(tl_query(zh, "@attr 2=3 @attr gils 1=2040 @attr 4=109 \"41 49\" ", 1));
+
+ /* = */
+ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=3 {2107-09-19 00:00:00}", 1));
+ /* < */
+ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=1 {2107-09-19 00:00:00}", 0));
+ /* <= */
+ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=2 {2107-09-19 00:00:00}", 1));
+ /* >= */
+ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=4 {2107-09-19 00:00:00}", 1));
+ /* > */
+ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=5 {2107-09-19 00:00:00}", 0));
+
YAZ_CHECK(tl_close_down(zh, zs));
}