X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fxpath%2Fxpath3.c;h=6ca551dc024fa4bf593a2c25aabf31d002f858e9;hb=2172d9cde5ac3e0f8bf17838aa7b1ac360f87049;hp=f63c5f70bb8a7e2d4f63f880a8bb4c594fddcee6;hpb=03b7cf6c23d28f8762eeb6bb4e415c52b2ebfc4e;p=idzebra-moved-to-github.git diff --git a/test/xpath/xpath3.c b/test/xpath/xpath3.c index f63c5f7..6ca551d 100644 --- a/test/xpath/xpath3.c +++ b/test/xpath/xpath3.c @@ -1,7 +1,7 @@ -/* $Id: xpath3.c,v 1.3 2005-01-03 12:10:23 adam Exp $ - Copyright (C) 2003,2004 - Index Data Aps +/* $Id: xpath3.c,v 1.6 2006-03-31 15:58:10 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS This file is part of the Zebra server. @@ -36,20 +36,20 @@ const char *myrec[] = { 0}; -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); - init_data(zh, myrec); - -#define q(qry,hits) do_query(__LINE__,zh,qry,hits) - - q("@attr 1=/root content",1); - q("@attr 1=/root/first content",1); - q("@attr {1=/root/first[@attr='danish']} content",1); - q("@attr {1=/root/second[@attr='danish lake']} content",1); - q("@attr {1=/root/third[@attr='dansk s\xc3\xb8']} content",1); + ZebraService zs = tl_start_up(0, argc, argv); + ZebraHandle zh = zebra_open(zs, 0); + YAZ_CHECK(tl_init_data(zh, myrec)); + + YAZ_CHECK(tl_query(zh, "@attr 1=/root content",1)); + YAZ_CHECK(tl_query(zh, "@attr 1=/root/first content",1)); + YAZ_CHECK(tl_query(zh, "@attr {1=/root/first[@attr='danish']} content",1)); + YAZ_CHECK(tl_query(zh, "@attr {1=/root/second[@attr='danish lake']} content",1)); + YAZ_CHECK(tl_query(zh, "@attr {1=/root/third[@attr='dansk s\xc3\xb8']} content",1)); /* FIXME - This triggers bug200 */ - return close_down(zh, zs, 0); + YAZ_CHECK(tl_close_down(zh, zs)); } + +TL_MAIN