1 /* $Id: t14.c,v 1.2 2006-02-09 08:31:02 adam Exp $
2 Copyright (C) 2004-2005
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 Zebra; see the file LICENSE.zebra. If not, write to the
19 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
25 static void create_search_drop(ZebraHandle zh)
27 const char *rec = "<gils><title>some</title></gils>";
28 const char *opaque_id = "9";
31 res = zebra_create_database (zh, "Default");
32 TL_ASSERT(res == ZEBRA_OK);
35 res = zebra_admin_exchange_record (
37 opaque_id, strlen(opaque_id),
39 TL_ASSERT(res == ZEBRA_OK);
41 res = zebra_admin_exchange_record (
43 opaque_id, strlen(opaque_id),
44 4); /* update/insert */
46 TL_ASSERT(res == ZEBRA_OK);
47 do_query(__LINE__, zh, "@attr 1=4 some", 1);
49 zebra_drop_database(zh, "Default");
51 do_query_x(__LINE__, zh, "@attr 1=4 some", 0, 109);
55 int main(int argc, char **argv)
57 ZebraService zs = start_up("zebra.cfg", argc, argv);
58 ZebraHandle zh = zebra_open(zs, 0);
61 res = zebra_select_database(zh, "Default");
62 TL_ASSERT(res == ZEBRA_OK);
66 create_search_drop(zh);
68 create_search_drop(zh);
70 return close_down(zh, zs, 0);