diff options
| author | Daniel Veillard <veillard@src.gnome.org> | 2000-09-04 11:15:39 +0000 |
|---|---|---|
| committer | Daniel Veillard <veillard@src.gnome.org> | 2000-09-04 11:15:39 +0000 |
| commit | 98a7916ba1495b3d8e07cc782b1a677c96788696 (patch) | |
| tree | 1800e2ba2c2327fe6b832c815e6d24f481b53b2e /testURI.c | |
| parent | 960aa53d2f59827bdd06c25e3244932d92f1a468 (diff) | |
| download | android_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.c | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -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) { |
