Added new ICU test case which illustrates removal of diacritics
[yaz-moved-to-github.git] / test / tstsoap2.c
index b424ebc..342c86d 100644 (file)
@@ -1,18 +1,16 @@
-/*
- * Copyright (C) 1995-2005, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
  * See the file LICENSE for details.
- *
- * $Id: tstsoap2.c,v 1.3 2006-01-29 21:59:13 adam Exp $
  */
 
 #include <stdlib.h>
-#if HAVE_XML2
-#include <libxml/parser.h>
-
 #include <yaz/test.h>
 #include <yaz/srw.h>
 #include <yaz/soap.h>
 
+#if YAZ_HAVE_XML2
+#include <libxml/parser.h>
+
 static void tst_srw(void)
 {
     const char *charset = 0;
@@ -25,19 +23,19 @@ static void tst_srw(void)
         {0, 0, 0}
     };
     Z_SRW_PDU *sr = yaz_srw_get(o, Z_SRW_searchRetrieve_request);
-    Z_SOAP *p = odr_malloc(o, sizeof(*p));
+    Z_SOAP *p = (Z_SOAP *) odr_malloc(o, sizeof(*p));
 
     YAZ_CHECK(o);
     YAZ_CHECK(sr);
     YAZ_CHECK(p);
 #if 0
-    sr->u.request->query.cql = "jordbær"; 
+    sr->u.request->query.cql = "jordb" "\xe6" "r"; 
 #else
     sr->u.request->query.cql = "jordbaer"; 
 #endif
 
     p->which = Z_SOAP_generic;
-    p->u.generic = odr_malloc(o, sizeof(*p->u.generic));
+    p->u.generic = (Z_SOAP_Generic *) odr_malloc(o, sizeof(*p->u.generic));
     p->u.generic->no = 0;
     p->u.generic->ns = 0;
     p->u.generic->p = sr;
@@ -52,7 +50,7 @@ static void tst_srw(void)
 int main(int argc, char **argv)
 {
     YAZ_CHECK_INIT(argc, argv);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     LIBXML_TEST_VERSION;
     tst_srw();
 #endif