projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed yaz_iconv to return YAZ_ICONV_EINVAL if an incomplete MARC-8
[yaz-moved-to-github.git]
/
test
/
tstsoap2.c
diff --git
a/test/tstsoap2.c
b/test/tstsoap2.c
index
0fd766e
..
230d403
100644
(file)
--- a/
test/tstsoap2.c
+++ b/
test/tstsoap2.c
@@
-1,17
+1,18
@@
/*
/*
- * Copyright (C) 1995-2005, Index Data ApS
+ * Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
* See the file LICENSE for details.
*
- * $Id: tstsoap2.c,v 1.1 2005-05-06 11:11:37 adam Exp $
+ * $Id: tstsoap2.c,v 1.6 2007-01-03 08:42:16 adam Exp $
*/
#include <stdlib.h>
*/
#include <stdlib.h>
-#if HAVE_XML2
-#include <libxml/parser.h>
-
+#include <yaz/test.h>
#include <yaz/srw.h>
#include <yaz/soap.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;
static void tst_srw(void)
{
const char *charset = 0;
@@
-26,6
+27,9
@@
static void tst_srw(void)
Z_SRW_PDU *sr = yaz_srw_get(o, Z_SRW_searchRetrieve_request);
Z_SOAP *p = odr_malloc(o, sizeof(*p));
Z_SRW_PDU *sr = yaz_srw_get(o, Z_SRW_searchRetrieve_request);
Z_SOAP *p = odr_malloc(o, sizeof(*p));
+ YAZ_CHECK(o);
+ YAZ_CHECK(sr);
+ YAZ_CHECK(p);
#if 0
sr->u.request->query.cql = "jordbær";
#else
#if 0
sr->u.request->query.cql = "jordbær";
#else
@@
-41,22
+45,24
@@
static void tst_srw(void)
ret = z_soap_codec_enc(o, &p, &content_buf, &content_len, h, charset);
odr_destroy(o);
ret = z_soap_codec_enc(o, &p, &content_buf, &content_len, h, charset);
odr_destroy(o);
- if (ret)
- {
- printf("z_soap_codec_enc failed\n");
- exit(1);
- }
+ YAZ_CHECK(ret == 0); /* codec failed ? */
}
#endif
int main(int argc, char **argv)
{
}
#endif
int main(int argc, char **argv)
{
-#if HAVE_XML2
- LIBXML_TEST_VERSION
- if (argc <= 1)
- {
- tst_srw();
- }
+ YAZ_CHECK_INIT(argc, argv);
+#if YAZ_HAVE_XML2
+ LIBXML_TEST_VERSION;
+ tst_srw();
#endif
#endif
- return 0;
+ YAZ_CHECK_TERM;
}
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+