X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ftest_resources.c;h=6c157e24a3ceebee6fb884f010f246bd99dd64ba;hb=dcda88860b03641b6900d43135ca769f005105e8;hp=47e38ef8f9e5ccd51bca4af7d58fcf92b7df42f9;hpb=965cbd297cf8de73cfe01d55983b8161ae7cf67e;p=idzebra-moved-to-github.git diff --git a/test/api/test_resources.c b/test/api/test_resources.c index 47e38ef..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) 1995-2008 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 */, @@ -116,6 +119,7 @@ TL_MAIN /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab