X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Ftest_config.c;h=59e3d7309d9c4b5a77ea223bca775ba0aae2c756;hb=043c2f97c9b6fa76fbe50c27c4d145a0f16e9e82;hp=f351a280041d440f6471aec8068071aea3fd82a5;hpb=4833f9b9e2ee24c3e784130710b17c9dfa287781;p=pazpar2-moved-to-github.git diff --git a/src/test_config.c b/src/test_config.c index f351a28..59e3d73 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -1,7 +1,5 @@ -/* $Id: test_config.c,v 1.3 2007-04-25 07:00:33 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,13 +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 + +*/ #if HAVE_CONFIG_H -#include "cconfig.h" +#include #endif #define USE_TIMING 0 @@ -30,7 +28,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include -#include "config.h" +#include "pazpar2_config.h" @@ -47,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));