From: Adam Dickmeiss Date: Wed, 9 Apr 2008 11:44:58 +0000 (+0200) Subject: Added test case for facets. X-Git-Tag: v2.0.30~12 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=36f484800c64a3005bb82ab86d3ce6454e218598;p=idzebra-moved-to-github.git Added test case for facets. --- diff --git a/test/api/t5.c b/test/api/t5.c index 25663b4..0379cb5 100644 --- a/test/api/t5.c +++ b/test/api/t5.c @@ -38,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));