X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftest_xmlquery.c;h=b1faf616c6292e9f5b0455d37cf4bd283a62756b;hb=5242cb5a8634bfa38b9333ff7f903e718ac6e292;hp=9015fa8c7ff6e6a9c977dabfffa201f03e84c7b5;hpb=43a9d38d20c1b1bcd1a03b2445a501d27526bd35;p=yaz-moved-to-github.git
diff --git a/test/test_xmlquery.c b/test/test_xmlquery.c
index 9015fa8..b1faf61 100644
--- a/test/test_xmlquery.c
+++ b/test/test_xmlquery.c
@@ -1,5 +1,5 @@
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2012 Index Data
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
@@ -52,7 +52,7 @@ enum pqf2xml_status pqf2xml_text(const char *pqf, const char *expect_xml,
xmlDocPtr doc = 0;
yaz_rpnquery2xml(rpn, &doc);
-
+
if (!doc)
status = QUERY2XML_FAILED;
else
@@ -61,7 +61,7 @@ enum pqf2xml_status pqf2xml_text(const char *pqf, const char *expect_xml,
int len_out;
xmlDocDumpMemory(doc, (xmlChar **) &buf_out, &len_out);
-
+
if (len_out == (int) strlen(expect_xml)
&& memcmp(buf_out, expect_xml, len_out) == 0)
{
@@ -70,7 +70,7 @@ enum pqf2xml_status pqf2xml_text(const char *pqf, const char *expect_xml,
const char *addinfo = 0;
const xmlNode *root_element = xmlDocGetRootElement(doc);
ODR odr2 = odr_createmem(ODR_ENCODE);
-
+
yaz_xml2query(root_element, &query2, odr2,
&error_code, &addinfo);
if (error_code || !query2)
@@ -111,7 +111,7 @@ static void tst(void)
YAZ_CHECK_EQ(pqf2xml_text("@attr 1=4 bad query", "", 0), PQF_FAILED);
#if YAZ_HAVE_XML2
YAZ_CHECK_EQ(pqf2xml_text(
- "@attr 1=4 computer",
+ "@attr 1=4 computer",
"\n"
""
""
@@ -119,7 +119,7 @@ static void tst(void)
"\n",
"RPN @attrset Bib-1 @attr 1=4 computer"
), XML_MATCH);
-
+
YAZ_CHECK_EQ(pqf2xml_text(
"@attr 2=1 @attr 1=title computer",
"\n"
@@ -141,9 +141,9 @@ static void tst(void)
"\n",
"RPN @attrset Bib-1 @attr Exp-1 1=1 @attr 2=1 computer"
), XML_MATCH);
-
+
YAZ_CHECK_EQ(pqf2xml_text(
- "@and a b",
+ "@and a b",
"\n"
""
""
@@ -152,9 +152,9 @@ static void tst(void)
"\n",
"RPN @attrset Bib-1 @and a b"
), XML_MATCH);
-
+
YAZ_CHECK_EQ(pqf2xml_text(
- "@or @and a b c",
+ "@or @and a b c",
"\n"
""
""
@@ -167,7 +167,7 @@ static void tst(void)
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
- "@set abe",
+ "@set abe",
"\n"
""
"abe\n",
@@ -175,9 +175,9 @@ static void tst(void)
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
- /* exclusion, distance, ordered, relationtype,
+ /* exclusion, distance, ordered, relationtype,
knownunit, proxunit */
- "@prox 0 3 1 2 k 2 a b",
+ "@prox 0 3 1 2 k 2 a b",
"\n"
""
"\n"
""
""
@@ -200,9 +200,9 @@ static void tst(void)
"\n",
"RPN @attrset Bib-1 @term numeric 32"
), XML_MATCH);
-
+
YAZ_CHECK_EQ(pqf2xml_text(
- "@term string computer",
+ "@term string computer",
"\n"
""
""
@@ -210,9 +210,9 @@ static void tst(void)
"\n",
"RPN @attrset Bib-1 @term string computer"
), XML_MATCH);
-
+
YAZ_CHECK_EQ(pqf2xml_text(
- "@term null void",
+ "@term null void",
"\n"
""
""
@@ -222,7 +222,7 @@ static void tst(void)
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
- "@attrset gils @attr 4=2 x",
+ "@attrset gils @attr 4=2 x",
"\n"
""
""