X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Ftest_config.c;h=59e3d7309d9c4b5a77ea223bca775ba0aae2c756;hb=90fcb8b46b3a967316abc0c82891c990f10dc97f;hp=d608d9896445d01939aafff89b7aee1e8e2f9eb5;hpb=f0f51e820f69d1661b94da14424b4109c16ab7bd;p=pazpar2-moved-to-github.git diff --git a/src/test_config.c b/src/test_config.c index d608d98..59e3d73 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -1,7 +1,5 @@ -/* $Id: test_config.c,v 1.2 2007-04-23 12:33:00 marc Exp $ - Copyright (c) 2006-2007, Index Data. - -This file is part of Pazpar2. +/* This file is part of Pazpar2. + Copyright (C) 2006-2008 Index Data Pazpar2 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 @@ -14,24 +12,13 @@ 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 Pazpar2; see the file LICENSE. 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +*/ #if HAVE_CONFIG_H -#include "cconfig.h" +#include #endif #define USE_TIMING 0 @@ -41,9 +28,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include - -//#include "pazpar2.h" -#include "config.h" +#include "pazpar2_config.h" @@ -60,47 +45,56 @@ void test_conf_service(int argc, char **argv) YAZ_CHECK(!conf_service_add_metadata(0, service, 0, "dead_nmem", Metadata_type_generic, Metadata_merge_unique, + Metadata_setting_no, 1, 1, 1, 0)); YAZ_CHECK(!conf_service_add_metadata(nmem, 0, 0, "service_needed", Metadata_type_generic, Metadata_merge_unique, + Metadata_setting_no, 1, 1, 1, 0)); YAZ_CHECK(!conf_service_add_metadata(nmem, service, -1, "out_of_bounds", Metadata_type_generic, Metadata_merge_unique, + Metadata_setting_no, 1, 1, 1, 0)); YAZ_CHECK(!conf_service_add_metadata(nmem, service, 4, "out_of_bounds", Metadata_type_generic, Metadata_merge_unique, + Metadata_setting_no, 1, 1, 1, 0)); YAZ_CHECK(!conf_service_add_metadata(nmem, service, 0, 0, //missing name Metadata_type_generic, Metadata_merge_unique, + Metadata_setting_no, 1, 1, 1, 0)); // expected metadata sucesses YAZ_CHECK(conf_service_add_metadata(nmem, service, 0, "title", Metadata_type_generic, Metadata_merge_unique, + Metadata_setting_no, 1, 1, 1, 0)); YAZ_CHECK(conf_service_add_metadata(nmem, service, 1, "author", Metadata_type_generic, Metadata_merge_longest, + Metadata_setting_no, 1, 1, 1, 0)); YAZ_CHECK(conf_service_add_metadata(nmem, service, 2, "isbn", Metadata_type_number, Metadata_merge_no, + Metadata_setting_no, 1, 1, 1, 0)); YAZ_CHECK(conf_service_add_metadata(nmem, service, 3, "year", Metadata_type_year, Metadata_merge_range, + Metadata_setting_no, 1, 1, 1, 0));