X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ft7.c;h=f943cbe7bc1a0a8bac63cbc5aac9c83854f5fca2;hb=f84ad20a7a6a45d02da7f162fa6bb1137e79a07f;hp=2378a6a097b4917493514d713d9a46f2a793d50d;hpb=4989a5fc444f3bca0f094f1ac2bfe4f04af5e666;p=idzebra-moved-to-github.git diff --git a/test/api/t7.c b/test/api/t7.c index 2378a6a..f943cbe 100644 --- a/test/api/t7.c +++ b/test/api/t7.c @@ -1,4 +1,4 @@ -/* $Id: t7.c,v 1.3 2004-10-28 15:24:36 heikki Exp $ +/* $Id: t7.c,v 1.4 2004-10-29 13:02:39 heikki Exp $ Copyright (C) 2004 Index Data Aps @@ -20,23 +20,23 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include -#include -#include +/** t7.c sorting */ #include "testlib.h" +#include - -int main(int argc, char **argv) -{ - ZebraService zs; - ZebraHandle zh; - const char *recs[] = { +const char *recs[] = { "\n" " My title\n" "\n", 0}; + + +int main(int argc, char **argv) +{ + ZebraService zs = start_up(0, argc, argv); + ZebraHandle zh = zebra_open (zs); + const char *setname1="set1"; const char *setname2="set2"; const char *setname3="set3"; @@ -51,13 +51,6 @@ int main(int argc, char **argv) yaz_sort_spec (odr_output, "@attr 1=4 id"); int hits; - yaz_log_init_file("t7.log"); - - nmem_init (); - - zs = start_service(""); /* default to zebra.cfg */ - zh = zebra_open (zs); - init_data(zh,recs); @@ -90,11 +83,6 @@ int main(int argc, char **argv) odr_destroy (odr_output); zebra_commit (zh); - zebra_close (zh); - zebra_stop (zs); - nmem_exit (); - xmalloc_trav ("x"); - logf(LOG_LOG,"========= all tests OK"); - exit (0); + return close_down(zh,zs,0); }