X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ft13.c;h=3214908bfe28b75f16541d6af45cb40067f7c57e;hb=89d3a004b7c651fd5673abfc192e1472dc4d4197;hp=a307be128ff4d0e49ee111f018b631cfbfbc80db;hpb=66291dd47d5d44e4af1e3f9b1158bd5c6a32f0c3;p=idzebra-moved-to-github.git diff --git a/test/api/t13.c b/test/api/t13.c index a307be1..3214908 100644 --- a/test/api/t13.c +++ b/test/api/t13.c @@ -1,5 +1,5 @@ -/* $Id: t13.c,v 1.4 2006-03-25 15:34:07 adam Exp $ - Copyright (C) 1995-2005 +/* $Id: t13.c,v 1.12 2007-01-15 15:10:20 adam Exp $ + Copyright (C) 1995-2007 Index Data ApS This file is part of the Zebra server. @@ -15,15 +15,15 @@ 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 + */ /** test resources */ #include #include -#include +#include "testlib.h" #include static void tst_res(void) @@ -49,7 +49,7 @@ static void tst_res(void) zh = zebra_open(zs, 0); YAZ_CHECK(zh); - zebra_select_database(zh, "Default"); + YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); /* run this a few times so we can see leaks easier */ for (i = 0; i<10; i++) @@ -83,7 +83,7 @@ static void tst_no_config(void) static char *xml_buf = "myx"; ZebraService zs; ZebraHandle zh; - SYSNO sysno = 0; + zint sysno = 0; zs = zebra_start_res(0, 0, 0); YAZ_CHECK(zs); @@ -98,7 +98,7 @@ static void tst_no_config(void) zebra_set_resource(zh, "profilePath", "${srcdir:-.}/../../tab"); YAZ_CHECK_EQ(zebra_insert_record(zh /* handle */, - "grs.xml" /* record type */, + "grs.sgml" /* record type */, &sysno, 0 /* match */, 0 /* fname */, xml_buf, strlen(xml_buf), @@ -109,11 +109,18 @@ static void tst_no_config(void) zebra_stop(zs); } - -int main(int argc, char **argv) +static void tst(int argc, char **argv) { - YAZ_CHECK_INIT(argc, argv); tst_res(); tst_no_config(); - YAZ_CHECK_TERM; } + +TL_MAIN +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +