X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Frusmarc%2Ft1.c;h=4ec7e211965448952ac77e89be9281dc4bfbfdc9;hb=6c5eead59b04271013219c4e71b3a1314ced4957;hp=c5c62b8f0bdd41f76f61837ba806ac0d78f1b5d3;hpb=84b6283b3a13ae2aa4ce41dd8d3dded2ed7bca3e;p=idzebra-moved-to-github.git diff --git a/test/rusmarc/t1.c b/test/rusmarc/t1.c index c5c62b8..4ec7e21 100644 --- a/test/rusmarc/t1.c +++ b/test/rusmarc/t1.c @@ -1,6 +1,6 @@ -/* $Id: t1.c,v 1.2 2004-12-14 10:53:49 adam Exp $ - Copyright (C) 2003,2004 - Index Data Aps +/* $Id: t1.c,v 1.5 2006-03-31 15:58:09 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS This file is part of the Zebra server. @@ -35,27 +35,28 @@ void check_koi8r() yaz_iconv_close(cd); } -int main(int argc, char **argv) +static void tst(int argc, char **argv) { - ZebraService zs = start_up(0, argc, argv); - ZebraHandle zh = zebra_open(zs); + ZebraService zs = tl_start_up(0, argc, argv); + ZebraHandle zh = zebra_open(zs, 0); char path[256]; check_koi8r(); - zebra_select_database(zh, "Default"); + YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); - - zebra_begin_trans(zh, 1); - sprintf(path, "%.200s/records/simple-rusmarc", get_srcdir()); + YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); + sprintf(path, "%.200s/records/simple-rusmarc", tl_get_srcdir()); zebra_repository_update(zh, path); - zebra_end_trans(zh); + YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); - do_query(__LINE__, zh, "@attr 1=21 \xfa\xc1\xcd\xd1\xd4\xc9\xce", 1); + YAZ_CHECK(tl_query(zh, "@attr 1=21 \xfa\xc1\xcd\xd1\xd4\xc9\xce", 1)); - return close_down(zh, zs, 0); + YAZ_CHECK(tl_close_down(zh, zs)); } + +TL_MAIN