CCL: add tests for CCL s=ag
[yaz-moved-to-github.git] / test / test_retrieval.c
index 9b7bf8a..a374159 100644 (file)
@@ -1,17 +1,17 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data
+ * Copyright (C) 1995-2012 Index Data
  * See the file LICENSE for details.
  */
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <yaz/retrieval.h>
 #include <yaz/test.h>
 #include <yaz/wrbuf.h>
 #include <string.h>
 #include <yaz/log.h>
 
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #if YAZ_HAVE_XSLT
 
 #include <libxml/parser.h>
@@ -262,6 +262,25 @@ static void tst_configure(void)
                                   "Element <marc inputformat='not-existent'>:  Unsupported"
                                   " input format defined by attribute value", 0));
 
+
+    YAZ_CHECK(conv_configure_test("<retrievalinfo>"
+                                  "<retrieval syntax=\"usmarc\">"
+                                  "<backend syntax=\"xml\" name=\"dc\">"
+                                  "<xslt stylesheet=\"test_record_conv.xsl\"/>"
+                                  "<marc"
+                                  " inputcharset=\"utf-8\""
+                                  " outputcharset=\"marc-8\""
+                                  " inputformat=\"xml\""
+                                  " outputformat=\"marc\""
+                                  "/>"
+                                  "</backend>"
+                                  "<backend/>"
+                                  "</retrieval>"
+                                  "</retrievalinfo>",
+                                  "Element <retrieval>: "
+                                  "only one <backend> allowed", 0));
+
+
     YAZ_CHECK(conv_configure_test("<retrievalinfo>"
                                   "<retrieval syntax=\"usmarc\">"
                                   "<backend syntax=\"xml\" name=\"dc\">"