X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=test%2Fapi%2Ftest_search.c;fp=test%2Fapi%2Ftest_search.c;h=de6730f15f8e68375babb5064af83c845e6a521b;hp=55219f97d7fd7bc56a2c7214a5905eea2b2edcde;hb=4b25ee9a2fbd9a641095362fc424c1f7b7c0ca2c;hpb=64e695fc8ebc57dad345fa037e6a83bd403bb22b diff --git a/test/api/test_search.c b/test/api/test_search.c index 55219f9..de6730f 100644 --- a/test/api/test_search.c +++ b/test/api/test_search.c @@ -67,20 +67,31 @@ 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"); + YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "zebra::facet::title:w", + yaz_oid_recsyn_sutrs, + "facet w title\n" + "term 3 3: my\n" + "term 3 3: title\n" + "term 2 2: x\n"), ZEBRA_OK); + + YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "zebra::facet::title:s", + yaz_oid_recsyn_sutrs, + "facet s title\n" + "term 1: my title\n" + "term 1: my title x\n" + "term 1: my x title\n"), ZEBRA_OK); /* 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"); - + YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "zebra::facet::title:w", + yaz_oid_recsyn_sutrs, + "facet w title\n" + "term 2 2: my\n" + "term 2 2: title\n" + "term 2 2: x\n"), ZEBRA_OK); + /* trunc left */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=2 titl", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=2 x", 2));