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