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
Implement yaz_retrieval_configure.
[yaz-moved-to-github.git]
/
test
/
tst_record_conv.c
diff --git
a/test/tst_record_conv.c
b/test/tst_record_conv.c
index
2b414c6
..
c6d9ac0
100644
(file)
--- a/
test/tst_record_conv.c
+++ b/
test/tst_record_conv.c
@@
-2,7
+2,7
@@
* Copyright (C) 2005-2006, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 2005-2006, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: tst_record_conv.c,v 1.2 2006-05-03 13:04:46 adam Exp $
+ * $Id: tst_record_conv.c,v 1.5 2006-05-05 18:37:08 adam Exp $
*
*/
#include <yaz/record_conv.h>
*
*/
#include <yaz/record_conv.h>
@@
-10,7
+10,11
@@
#include <yaz/wrbuf.h>
#include <string.h>
#include <yaz/wrbuf.h>
#include <string.h>
-#if HAVE_XML2
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if HAVE_XSLT
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
@@
-87,13
+91,14
@@
int conv_configure_test(const char *xmlstring, const char *expect_error,
}
else
{
}
else
{
- if (pt)
- *pt = p;
- else
- yaz_record_conv_destroy(p);
ret = 1;
}
}
ret = 1;
}
}
+ if (pt)
+ *pt = p;
+ else
+ yaz_record_conv_destroy(p);
+
wrbuf_free(w, 1);
return ret;
}
wrbuf_free(w, 1);
return ret;
}
@@
-214,6
+219,7
@@
static void tst_convert()
"</convert>",
0, &p));
YAZ_CHECK(conv_convert_test(p, marcxml_rec, iso2709_rec));
"</convert>",
0, &p));
YAZ_CHECK(conv_convert_test(p, marcxml_rec, iso2709_rec));
+ yaz_record_conv_destroy(p);
YAZ_CHECK(conv_configure_test("<convert>"
"<marc"
YAZ_CHECK(conv_configure_test("<convert>"
"<marc"
@@
-225,6
+231,7
@@
static void tst_convert()
"</convert>",
0, &p));
YAZ_CHECK(conv_convert_test(p, iso2709_rec, marcxml_rec));
"</convert>",
0, &p));
YAZ_CHECK(conv_convert_test(p, iso2709_rec, marcxml_rec));
+ yaz_record_conv_destroy(p);
YAZ_CHECK(conv_configure_test("<convert>"
YAZ_CHECK(conv_configure_test("<convert>"
@@
-245,7
+252,7
@@
static void tst_convert()
"</convert>",
0, &p));
YAZ_CHECK(conv_convert_test(p, marcxml_rec, marcxml_rec));
"</convert>",
0, &p));
YAZ_CHECK(conv_convert_test(p, marcxml_rec, marcxml_rec));
-
+ yaz_record_conv_destroy(p);
YAZ_CHECK(conv_configure_test("<convert>"
YAZ_CHECK(conv_configure_test("<convert>"
@@
-264,7
+271,7
@@
static void tst_convert()
"</convert>",
0, &p));
YAZ_CHECK(conv_convert_test(p, marcxml_rec, marcxml_rec));
"</convert>",
0, &p));
YAZ_CHECK(conv_convert_test(p, marcxml_rec, marcxml_rec));
-
+ yaz_record_conv_destroy(p);
}
#endif
}
#endif
@@
-272,7
+279,7
@@
static void tst_convert()
int main(int argc, char **argv)
{
YAZ_CHECK_INIT(argc, argv);
int main(int argc, char **argv)
{
YAZ_CHECK_INIT(argc, argv);
-#if HAVE_XML2
+#if HAVE_XSLT
tst_configure();
tst_convert();
#endif
tst_configure();
tst_convert();
#endif