aboutsummaryrefslogtreecommitdiffstats
path: root/testURI.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2000-09-04 11:15:39 +0000
committerDaniel Veillard <veillard@src.gnome.org>2000-09-04 11:15:39 +0000
commit98a7916ba1495b3d8e07cc782b1a677c96788696 (patch)
tree1800e2ba2c2327fe6b832c815e6d24f481b53b2e /testURI.c
parent960aa53d2f59827bdd06c25e3244932d92f1a468 (diff)
downloadandroid_external_libxml2-98a7916ba1495b3d8e07cc782b1a677c96788696.tar.gz
android_external_libxml2-98a7916ba1495b3d8e07cc782b1a677c96788696.tar.bz2
android_external_libxml2-98a7916ba1495b3d8e07cc782b1a677c96788696.zip
URI work cleanup and regresssion tests,
- uri.c testUri.c: applied Wayne Davidson patches - test/URI/uri.data result/URI/uri.data: first set of tests/results - Makefile.in: added URItest and included thenin "make tests" Daniel
Diffstat (limited to 'testURI.c')
-rw-r--r--testURI.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/testURI.c b/testURI.c
index 50b508e2..349ca028 100644
--- a/testURI.c
+++ b/testURI.c
@@ -58,17 +58,24 @@ int main(int argc, char **argv) {
i--;
str[i] = 0;
}
- if (i <= 0)
- continue;
- ret = xmlParseURIReference(uri, str);
- if (ret != 0)
- printf("%s : error %d\n", str, ret);
- else {
- xmlPrintURI(stdout, uri);
- printf("\n");
+ if (base == NULL) {
+ ret = xmlParseURIReference(uri, str);
+ if (ret != 0)
+ printf("%s : error %d\n", str, ret);
+ else {
+ xmlPrintURI(stdout, uri);
+ printf("\n");
+ }
+ } else {
+ composite = xmlBuildURI((xmlChar *)str, (xmlChar *) base);
+ if (composite != NULL) {
+ printf("%s\n", composite);
+ xmlFree(composite);
+ }
+ else
+ printf("::ERROR::\n");
}
-
}
} else {
while (argv[arg] != NULL) {