X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=test%2Fapi%2Ft5.c;h=0379cb59fc93f8ddea0d59fd792d6d33a9d178b2;hp=b185126da2d612d81dbc7baf65bad52f0b2c8bab;hb=1922579d92e1a9559d4c3ab4f1cf461f56c83c3b;hpb=4ff69ae35942e69d6947ff169febc26d5db8dddf diff --git a/test/api/t5.c b/test/api/t5.c index b185126..0379cb5 100644 --- a/test/api/t5.c +++ b/test/api/t5.c @@ -1,8 +1,5 @@ -/* $Id: t5.c,v 1.25 2007-12-03 14:33:35 adam Exp $ - Copyright (C) 1995-2007 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) 1995-2008 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -41,10 +38,19 @@ static void tst(int argc, char **argv) /* simple term */ YAZ_CHECK(tl_query(zh, "@attr 1=4 notfound", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 title", 3)); + tl_fetch_compare(zh, 1, "zebra::facet::title:w", yaz_oid_recsyn_sutrs, + "term 3 3: my\n" + "term 3 3: title\n" + "term 2 2: x\n"); /* trunc right */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=1 titl", 3)); + YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=1 x", 2)); + tl_fetch_compare(zh, 1, "zebra::facet::title:w", yaz_oid_recsyn_sutrs, + "term 2 2: my\n" + "term 2 2: title\n" + "term 2 2: x\n"); /* trunc left */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=2 titl", 0)); @@ -127,6 +133,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=4 @attr 2=103 {x my}", 3)); YAZ_CHECK(tl_query_x(zh, "@attr 1=1 @attr 2=103 {x my}", 0, 114));