-/* $Id: t6.c,v 1.4 2004-10-28 15:24:36 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* $Id: t6.c,v 1.6 2004-12-02 11:28:20 adam Exp $
+ Copyright (C) 2003,2004
Index Data Aps
This file is part of the Zebra server.
02111-1307, USA.
*/
-#include <stdlib.h>
-
-#include <yaz/log.h>
-#include <yaz/pquery.h>
-#include <idzebra/api.h>
+/** t6.c Insert a number of randomly generated words */
#include "testlib.h"
-
int main(int argc, char **argv)
{
int i;
- ZebraService zs;
- ZebraHandle zh;
+ ZebraService zs = start_up(0, argc, argv);
+ ZebraHandle zh = zebra_open(zs);
- yaz_log_init_file("t6.log");
-
- nmem_init ();
-
srand(17);
- zs = start_service("");
- zh = zebra_open(zs);
zebra_select_database(zh, "Default");
zebra_init(zh);
zebra_close(zh);
strcat(rec_buf, "</Control-Identifier></gils>");
zebra_add_record (zh, rec_buf, strlen(rec_buf));
- zebra_end_trans (zh);
+ zebra_end_trans(zh);
zebra_close(zh);
}
- zebra_stop(zs);
- nmem_exit ();
- xmalloc_trav ("x");
- logf(LOG_LOG,"========= all tests OK");
- exit (0);
+ return close_down(0 /*zh*/, zs, 0);
}