X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Frusmarc%2Ft1.c;h=7bf31d832972836bbeb54839a113ce62404001f3;hb=ecb3935e78cd9bcfdebafdee0834cfb1060d7b5e;hp=d0381e6031be10896e5a5477ebab13adcfb51ff0;hpb=6c9fcd3b5d3108702fa1ffc92dab4ab6060f9a19;p=idzebra-moved-to-github.git diff --git a/test/rusmarc/t1.c b/test/rusmarc/t1.c index d0381e6..7bf31d8 100644 --- a/test/rusmarc/t1.c +++ b/test/rusmarc/t1.c @@ -1,4 +1,4 @@ -/* $Id: t1.c,v 1.3 2005-01-15 19:38:39 adam Exp $ +/* $Id: t1.c,v 1.6 2006-05-10 08:13:38 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -35,27 +35,36 @@ 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 +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +