X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ftestlib.c;h=e5a774541ff3c81431a32b26a9aae45b108d0ebd;hb=3d6d9a44b38717e7e9a2c64b68db895998d4de82;hp=8301cb6f2d188bfd6d617ed1d9b44df923b24ffe;hpb=09563d8acae53c6479d853e35e3bd53991e880c7;p=idzebra-moved-to-github.git diff --git a/test/api/testlib.c b/test/api/testlib.c index 8301cb6..e5a7745 100644 --- a/test/api/testlib.c +++ b/test/api/testlib.c @@ -1,4 +1,4 @@ -/* $Id: testlib.c,v 1.24 2005-08-09 09:35:26 adam Exp $ +/* $Id: testlib.c,v 1.25 2005-08-09 12:30:47 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -378,6 +378,51 @@ void meta_query(int lineno, ZebraHandle zh, char *query, int exphits, free(positions); } +void do_sort(ZebraHandle zh, const char *query, zint hits, zint *exp) +{ + ZebraMetaRecord *recs; + zint i; + int errs = 0; + zint min_val_recs = 0; + zint min_val_exp = 0; + + assert(query); + do_query(__LINE__, zh, query, hits); + + recs = zebra_meta_records_create_range (zh, "rsetname", 1, 4); + if (!recs) + { + fprintf(stderr, "recs==0\n"); + exit(1); + } + /* find min for each sequence to get proper base offset */ + for (i = 0; i