X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftst_record_conv.c;h=358b73df55146b2c3cd0f92377808b23ff29276a;hb=fc6d778b923000b5c6ad8e108b0b184178a9d33f;hp=fbd218a7f8c601d5ab03d4c8f5692dcca302fd9d;hpb=d305f63028800611fd05a3bfc54db24e2634d7ad;p=yaz-moved-to-github.git diff --git a/test/tst_record_conv.c b/test/tst_record_conv.c index fbd218a..358b73d 100644 --- a/test/tst_record_conv.c +++ b/test/tst_record_conv.c @@ -2,19 +2,21 @@ * Copyright (C) 2005-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: tst_record_conv.c,v 1.6 2006-05-07 14:48:25 adam Exp $ + * $Id: tst_record_conv.c,v 1.9 2006-07-06 10:17:55 adam Exp $ * */ #include #include #include #include +#include +#include #if HAVE_CONFIG_H #include #endif -#if HAVE_XSLT +#if YAZ_HAVE_XML2 #include #include @@ -111,6 +113,7 @@ static void tst_configure() YAZ_CHECK(conv_configure_test("", "Bad element 'bad'." "Expected marc, xslt, ..", 0)); +#if YAZ_HAVE_XSLT YAZ_CHECK(conv_configure_test("" "" "", "Attribute 'inputformat' required", 0)); YAZ_CHECK(conv_configure_test("" + "" + "", + "Missing attribute 'stylesheet'", 0)); + YAZ_CHECK(conv_configure_test("" "" "" "", 0, 0)); +#else + YAZ_CHECK(conv_configure_test("" + "" + "", + "xslt unsupported." + " YAZ compiled without XSLT support", 0)); +#endif } static int conv_convert_test(yaz_record_conv_t p, @@ -280,8 +294,11 @@ static void tst_convert() int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); -#if HAVE_XSLT + libxml2_error_to_yazlog(0 /* disable log */, 0); +#if YAZ_HAVE_XML2 tst_configure(); +#endif +#if YAZ_HAVE_XSLT tst_convert(); #endif YAZ_CHECK_TERM;