X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ft15.c;h=99b2a63ef7312708f9efef00a0f869a61b37bb24;hb=9d9266bfed4daa001a3f038f0d5b6e8c51a37373;hp=3d0c15e3b5d0d57c6c9385476aabcd32d339d0e8;hpb=8d79127b1f081818d59b1f6119d373d50468ab30;p=idzebra-moved-to-github.git diff --git a/test/api/t15.c b/test/api/t15.c index 3d0c15e..99b2a63 100644 --- a/test/api/t15.c +++ b/test/api/t15.c @@ -1,5 +1,5 @@ -/* $Id: t15.c,v 1.2 2006-04-05 02:03:33 adam Exp $ - Copyright (C) 2004-2005 +/* $Id: t15.c,v 1.7 2006-08-14 10:40:22 adam Exp $ + Copyright (C) 2004-2006 Index Data ApS This file is part of the Zebra server. @@ -15,12 +15,17 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#if HAVE_SYS_STAT_H +#include +#endif +#if HAVE_SYS_TYPES_H #include +#endif #if HAVE_UNISTD_H #include #endif @@ -59,8 +64,8 @@ static void search_process(ZebraService zs, int iter) YAZ_CHECK(hits >= hits_max); if (hits < hits_max) - printf("hits=%lld hits_max=%lld\n", hits, hits_max); - hits_max = hits; + printf("i=%d hits=%lld hits_max=%lld\n", i, hits, hits_max); + hits_max = hits; zebra_close(zh); } } @@ -80,12 +85,16 @@ static pid_t fork_service(ZebraService zs, int iter, static void tst(int argc, char **argv) { - ZebraService zs = tl_start_up("zebra15.cfg", argc, argv); - - ZebraHandle zh = zebra_open(zs, 0); + ZebraService zs; + ZebraHandle zh; + + mkdir("register", 0775); + mkdir("shadow", 0775); + zs = tl_start_up("zebra15.cfg", argc, argv); YAZ_CHECK(zs); + zh = zebra_open(zs, 0); YAZ_CHECK(zh); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); @@ -117,7 +126,15 @@ static void tst(int argc, char **argv) } #endif #endif - + YAZ_CHECK(tl_close_down(0, zs)); } TL_MAIN +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +