X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftst_retrieval.c;h=f49c2c2b7c2cb20573d56826ec5e8209d7b79320;hb=2edee0444eb7d2aba3528a6ae6523c2d1dd92a18;hp=7a2561bd1e78f302c747115718da1b0436b999e6;hpb=9dfcbb70828f8d5b524c9bb45852246ae1dd6878;p=yaz-moved-to-github.git diff --git a/test/tst_retrieval.c b/test/tst_retrieval.c index 7a2561b..f49c2c2 100644 --- a/test/tst_retrieval.c +++ b/test/tst_retrieval.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 2005-2006, Index Data ApS + * Copyright (C) 2005-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: tst_retrieval.c,v 1.7 2006-10-04 16:59:34 mike Exp $ + * $Id: tst_retrieval.c,v 1.9 2007-01-03 08:42:16 adam Exp $ * */ #include @@ -110,57 +110,50 @@ static void tst_configure(void) "xmlParseMemory", 0)); YAZ_CHECK(conv_configure_test("", - "Missing 'retrievalinfo' element", 0)); + "Expected element ", 0)); YAZ_CHECK(conv_configure_test("", 0, 0)); YAZ_CHECK(conv_configure_test("", - "Bad element 'bad'." - " Expected 'retrieval'", 0)); + "Element :" + " expected element , got ", + 0)); YAZ_CHECK(conv_configure_test("" - "", + "", "Missing 'syntax' attribute", 0)); + YAZ_CHECK(conv_configure_test("" - "\n" - " " - "" - "" - "" - "" + "" "" "", - 0, 0)); + "Element : expected attributes " + "'syntax', identifier' or 'name', got " + "'unknown'", 0)); YAZ_CHECK(conv_configure_test("" - "" - "" - "" - "" - "" + "" "" - "" - "" - "" - "", + "Element : unknown attribute " + "value syntax='unknown_synt'", 0)); + + YAZ_CHECK(conv_configure_test("" + "" - "" - "" + "", + 0, 0)); + + YAZ_CHECK(conv_configure_test("" + "" "", 0, 0)); @@ -170,58 +163,153 @@ static void tst_configure(void) " syntax=\"usmarc\"" " name=\"marcxml\"" " identifier=\"info:srw/schema/1/marcxml-v1.1\"" - ">" - "" - "" + "/>" "", 0, 0)); + + YAZ_CHECK(conv_configure_test("" "" + " name=\"marcxml\">" "" + "" + "", + "Element : expected zero or one element " + ", got ", 0)); + + YAZ_CHECK(conv_configure_test("" + "" + " " "" "", - 0, 0)); + "Element : expected attributes 'syntax' or 'name," + " got 'schema'", 0)); YAZ_CHECK(conv_configure_test("" "" + " " + "" + "", + 0, 0)); + + YAZ_CHECK(conv_configure_test("" + "" - "" + " name=\"marcxml\">" + " " "" "", - "Bad attribute 'backendschema'." - " Use 'backendname' instead", - 0)); + "Element : " + "attribute 'syntax' has invalid value " + "'unknown'", 0)); YAZ_CHECK(conv_configure_test("" "" - "" + " syntax=\"usmarc\"" + " identifier=\"info:srw/schema/1/marcxml-v1.1\"" + " name=\"marcxml\">" + " " "" "", - "Bad syntax 'unknown_synt'", 0)); + "Element : expected attributes " + "'syntax' or 'name, got 'unknown'", 0)); + YAZ_CHECK(conv_configure_test("" - "" - "" + "" + "" + "" + "" + "" "" "", - "Bad backendsyntax 'unknown_synt'", 0)); + "Element : Unsupported character" + " set mapping defined by attribute values", 0)); + + YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "" + "" + "" + "", + "Element : Unsupported" + " input format defined by attribute value", 0)); + + YAZ_CHECK(conv_configure_test("" + "" + "" + "" + "" + "" + "" + "", + 0, 0)); + + YAZ_CHECK(conv_configure_test( + "" + "" + "" + "" + "" + " " + " " + " " + "" + "" + " " + " " + " " + "" + "" + " " + " " + " " + " " + "" + "", + 0, 0)); }