X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftst_retrieval.c;h=7a2561bd1e78f302c747115718da1b0436b999e6;hb=67471e87c134f2503546cdd250cd169b7d43d566;hp=7482535ad915ab25bdb405edb67cca674dfe1ae5;hpb=76b209145568a179bb21a8d43db003ffe605b6d5;p=yaz-moved-to-github.git diff --git a/test/tst_retrieval.c b/test/tst_retrieval.c index 7482535..7a2561b 100644 --- a/test/tst_retrieval.c +++ b/test/tst_retrieval.c @@ -2,19 +2,21 @@ * Copyright (C) 2005-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: tst_retrieval.c,v 1.1 2006-05-04 20:00:45 adam Exp $ + * $Id: tst_retrieval.c,v 1.7 2006-10-04 16:59:34 mike Exp $ * */ #include #include #include #include +#include +#include #if HAVE_CONFIG_H #include #endif -#if HAVE_XSLT +#if YAZ_HAVE_XSLT #include #include @@ -102,24 +104,54 @@ int conv_configure_test(const char *xmlstring, const char *expect_error, return ret; } -static void tst_configure() +static void tst_configure(void) { - YAZ_CHECK(conv_configure_test("", "Missing 'convert' element", 0)); - YAZ_CHECK(conv_configure_test("", 0, 0)); - YAZ_CHECK(conv_configure_test("", + YAZ_CHECK(conv_configure_test("", + "Missing 'retrievalinfo' element", 0)); + + YAZ_CHECK(conv_configure_test("", 0, 0)); + + YAZ_CHECK(conv_configure_test("", "Bad element 'bad'." - "Expected marc, xslt, ..", 0)); - YAZ_CHECK(conv_configure_test("" + " Expected 'retrieval'", 0)); + + YAZ_CHECK(conv_configure_test("" + "", + "Missing 'syntax' attribute", 0)); + + YAZ_CHECK(conv_configure_test("" + "\n" + " " + "" "" "" + "" + "" + "", + 0, 0)); + + YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "" - "", - "Attribute 'inputformat' required", 0)); - YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "" "" "" - "", + "" + "" + "", 0, 0)); -#endif + + + YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "", + 0, 0)); + + YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "", + 0, 0)); + + YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "", + "Bad attribute 'backendschema'." + " Use 'backendname' instead", + 0)); + + + YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "", + "Bad syntax 'unknown_synt'", 0)); + + YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "", + "Bad backendsyntax 'unknown_synt'", 0)); + } #endif @@ -137,7 +230,10 @@ static void tst_configure() int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); -#if HAVE_XSLT + + libxml2_error_to_yazlog(0 /* disable it */, ""); + +#if YAZ_HAVE_XSLT tst_configure(); #endif YAZ_CHECK_TERM;