X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=test%2Fapi%2Ftest_resources.c;h=6c157e24a3ceebee6fb884f010f246bd99dd64ba;hp=84016101ba15fc2cb558e2c03168d0d5e97d2aea;hb=HEAD;hpb=6a0f9234f945bc4956e2bcef75f715661a9eba9a diff --git a/test/api/test_resources.c b/test/api/test_resources.c index 8401610..6c157e2 100644 --- a/test/api/test_resources.c +++ b/test/api/test_resources.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2009 Index Data + Copyright (C) Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -18,6 +18,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** test resources */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include "testlib.h" @@ -39,10 +42,10 @@ static void tst_res(void) temp_res = res_open(0, 0); /* completely empty */ YAZ_CHECK(temp_res); - + zs = zebra_start_res(0, default_res, temp_res); YAZ_CHECK(zs); - + zh = zebra_open(zs, 0); YAZ_CHECK(zh); @@ -62,10 +65,10 @@ static void tst_res(void) /* we should find the name1 from temp_res */ val = zebra_get_resource(zh, "name1", 0); YAZ_CHECK(val && !strcmp(val, "value2")); - + val = zebra_get_resource(zh, "name4", 0); YAZ_CHECK(val && !strcmp(val, "value4")); - + res_clear(temp_res); } zebra_close(zh); @@ -91,9 +94,9 @@ static void tst_no_config(void) YAZ_CHECK_EQ(zebra_select_database(zh, "Default"), ZEBRA_OK); YAZ_CHECK_EQ(zebra_init(zh), ZEBRA_OK); - + zebra_set_resource(zh, "profilePath", "${srcdir:-.}/../../tab"); - + YAZ_CHECK_EQ(zebra_update_record(zh /* handle */, action_insert, "grs.sgml" /* record type */,