mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
Rewrite/cleanup/tests of URI normalization:
- uri.c: rewrite of xmlNormalizeURIPath from Paul D. Smith - test/URI/smith.uri result/URI/smith.uri Makefile.am: added the new tests for URI normalization - testURI.c: fixed stoopid bugs - result/VC/OneID3 result/VC/UniqueElementTypeDeclaration: the URI in the error messages are now properly normalized Daniel
This commit is contained in:
10
testURI.c
10
testURI.c
@ -27,11 +27,8 @@ int main(int argc, char **argv) {
|
||||
const char *base = NULL;
|
||||
xmlChar *composite;
|
||||
|
||||
if (argv[arg] == NULL) {
|
||||
printf("Usage: %s [-base URI] URI ...\n", argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
if ((!strcmp(argv[arg], "-base")) || (!strcmp(argv[arg], "--base"))) {
|
||||
if ((argv[arg] != NULL) &&
|
||||
((!strcmp(argv[arg], "-base")) || (!strcmp(argv[arg], "--base")))) {
|
||||
arg++;
|
||||
base = argv[arg];
|
||||
if (base != NULL)
|
||||
@ -64,6 +61,7 @@ int main(int argc, char **argv) {
|
||||
if (ret != 0)
|
||||
printf("%s : error %d\n", str, ret);
|
||||
else {
|
||||
xmlNormalizeURIPath(uri->path);
|
||||
xmlPrintURI(stdout, uri);
|
||||
printf("\n");
|
||||
}
|
||||
@ -99,5 +97,5 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
xmlFreeURI(uri);
|
||||
xmlMemoryDump();
|
||||
exit(0);
|
||||
return(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user