1 /* $Id: t14.c,v 1.7 2007-03-14 11:48:32 adam Exp $
2 Copyright (C) 2004-2007
5 This file is part of the Zebra server.
7 Zebra is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 static void create_search_drop(ZebraHandle zh)
27 const char *rec = "<gils><title>some</title></gils>";
28 const char *opaque_id = "9";
30 YAZ_CHECK(zebra_create_database (zh, "Default") == ZEBRA_OK);
33 YAZ_CHECK(zebra_update_record(
40 == ZEBRA_OK); /* insert really */
42 YAZ_CHECK(zebra_update_record(
49 == ZEBRA_OK); /* replace really */
51 YAZ_CHECK(tl_query(zh, "@attr 1=4 some", 1));
53 zebra_drop_database(zh, "Default");
55 YAZ_CHECK(tl_query_x(zh, "@attr 1=4 some", 0, 109));
59 static void tst(int argc, char **argv)
61 ZebraService zs = tl_start_up("zebra.cfg", argc, argv);
62 ZebraHandle zh = zebra_open(zs, 0);
64 YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK);
68 create_search_drop(zh);
70 create_search_drop(zh);
72 YAZ_CHECK(tl_close_down(zh, zs));
79 * indent-tabs-mode: nil
81 * vim: shiftwidth=4 tabstop=8 expandtab