1 /* This file is part of the Zebra server.
2 Copyright (C) 1995-2008 Index Data
4 Zebra is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 static void create_search_drop(ZebraHandle zh)
24 const char *rec = "<gils><title>some</title></gils>";
25 const char *opaque_id = "9";
27 YAZ_CHECK(zebra_create_database (zh, "Default") == ZEBRA_OK);
30 YAZ_CHECK(zebra_update_record(
37 == ZEBRA_OK); /* insert really */
39 YAZ_CHECK(zebra_update_record(
46 == ZEBRA_OK); /* replace really */
48 YAZ_CHECK(tl_query(zh, "@attr 1=4 some", 1));
50 zebra_drop_database(zh, "Default");
52 YAZ_CHECK(tl_query_x(zh, "@attr 1=4 some", 0, 109));
56 static void tst(int argc, char **argv)
58 ZebraService zs = tl_start_up("zebra.cfg", argc, argv);
59 ZebraHandle zh = zebra_open(zs, 0);
61 YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK);
65 create_search_drop(zh);
67 create_search_drop(zh);
69 YAZ_CHECK(tl_close_down(zh, zs));
76 * indent-tabs-mode: nil
78 * vim: shiftwidth=4 tabstop=8 expandtab