32424d7bee35829886d5f23f9ddf795505ee69a6
[idzebra-moved-to-github.git] / test / api / test_start_stop.c
1 /* This file is part of the Zebra server.
2    Copyright (C) 1994-2010 Index Data
3
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
7 version.
8
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
12 for more details.
13
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
17
18 */
19
20 #include <yaz/test.h>
21 #include "testlib.h"
22
23 static void tst(int argc, char **argv)
24 {
25     YAZ_CHECK(!zebra_start("xxxxpoiasdfasfd.cfg")); /* should fail */
26
27     {
28         ZebraService zs = tl_start_up(0, argc, argv);
29         ZebraHandle  zh = 0;        
30         YAZ_CHECK(zs);
31
32         if (zs)
33         {
34             zh = zebra_open(zs, 0);
35             YAZ_CHECK(zh);
36         }
37         
38         YAZ_CHECK(tl_close_down(zh, zs));
39     }
40 }
41
42 TL_MAIN
43
44 /*
45  * Local variables:
46  * c-basic-offset: 4
47  * c-file-style: "Stroustrup"
48  * indent-tabs-mode: nil
49  * End:
50  * vim: shiftwidth=4 tabstop=8 expandtab
51  */
52