mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-03 08:58:17 +03:00
fixed a problem when base path was "./xxx" 5 test results changed by
* uri.c: fixed a problem when base path was "./xxx" * result/XInclude/*: 5 test results changed by above. * Makefile.am: fixed a couple of spots where a new result file used different flags that the testing one.
This commit is contained in:
parent
9333cc2115
commit
f20fbf70b2
@ -1,3 +1,10 @@
|
||||
Fri Jun 25 13:38:57 HKT 2004 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* uri.c: fixed a problem when base path was "./xxx"
|
||||
* result/XInclude/*: 5 test results changed by above.
|
||||
* Makefile.am: fixed a couple of spots where a new
|
||||
result file used different flags that the testing one.
|
||||
|
||||
Thu Jun 24 16:27:44 HKT 2004 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* valid.c: suppressed warnings from within xmlValidGetValidElements
|
||||
|
10
Makefile.am
10
Makefile.am
@ -158,7 +158,7 @@ HTMLPushtests : testHTML$(EXEEXT)
|
||||
if [ ! -d $$i ] ; then \
|
||||
if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
|
||||
echo New test file $$name ; \
|
||||
$(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
|
||||
$(CHECKER) $(top_builddir)/testHTML --push $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
|
||||
else \
|
||||
log=`$(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \
|
||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
||||
@ -191,7 +191,7 @@ HTMLPushtests : testHTML$(EXEEXT)
|
||||
if [ ! -d $$i ] ; then \
|
||||
if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
|
||||
echo New test file $$name ; \
|
||||
$(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
|
||||
$(CHECKER) $(top_builddir)/testHTML --push --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
|
||||
else \
|
||||
log=`$(CHECKER) $(top_builddir)/testHTML --push --sax $$i 2>&1 > result.$$name.sax ; \
|
||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
||||
@ -483,7 +483,7 @@ XIncludetests : xmllint$(EXEEXT)
|
||||
if [ ! -d $$i ] ; then \
|
||||
if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
|
||||
echo New test file $$name ; \
|
||||
$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --walker --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
|
||||
$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
|
||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
||||
else \
|
||||
log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name | grep -v 'failed to load external entity' ; \
|
||||
@ -523,7 +523,7 @@ Catatests : xmlcatalog$(EXEEXT)
|
||||
if [ -f $$xml ] ; then \
|
||||
if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
|
||||
echo New test file $$name ; \
|
||||
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i > $(srcdir)/result/catalogs/$$name ; \
|
||||
$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
|
||||
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
|
||||
else \
|
||||
log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
|
||||
@ -985,7 +985,7 @@ pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libxml-2.0.pc
|
||||
|
||||
#
|
||||
# Instll the tests program sources as examples
|
||||
# Install the tests program sources as examples
|
||||
#
|
||||
BASE_DIR=$(datadir)/doc
|
||||
DOC_MODULE=libxml2-$(VERSION)
|
||||
|
@ -11,7 +11,7 @@
|
||||
<isid myid="dup"/>
|
||||
</doc>
|
||||
<!-- including another XML document with IDs -->
|
||||
<doc xml:base="../../../test/XInclude/ents/ids.xml">
|
||||
<doc xml:base="../ents/ids.xml">
|
||||
<isid myid="dup"/>
|
||||
<isid myid="foo"/>
|
||||
<isid myid="bar"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
|
||||
<!-- Simple test of including another XML document -->
|
||||
<doc xml:base="../../../test/XInclude/ents/something.xml">
|
||||
<doc xml:base="../ents/something.xml">
|
||||
<p>something</p>
|
||||
<p>really</p>
|
||||
<p>simple</p>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
|
||||
<!-- Simple test of including a set of nodes from an XML document -->
|
||||
<p xml:base="../../../test/XInclude/ents/something.xml">something</p><p xml:base="../../../test/XInclude/ents/something.xml">really</p><p xml:base="../../../test/XInclude/ents/something.xml">simple</p>
|
||||
<p xml:base="../ents/something.xml">something</p><p xml:base="../ents/something.xml">really</p><p xml:base="../ents/something.xml">simple</p>
|
||||
</x>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<x xmlns:xinclude="http://www.w3.org/2003/XInclude">
|
||||
<!-- Simple test of including a set of nodes from an XML document -->
|
||||
<p xml:base="../../../test/XInclude/ents/something.xml">something</p><p xml:base="../../../test/XInclude/ents/something.xml">really</p><p xml:base="../../../test/XInclude/ents/something.xml">simple</p>
|
||||
<p xml:base="../ents/something.xml">something</p><p xml:base="../ents/something.xml">really</p><p xml:base="../ents/something.xml">simple</p>
|
||||
</x>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<this><sub-inc xml:base="../../../test/XInclude/ents/sub-inc.ent">is a test
|
||||
<this><sub-inc xml:base="../ents/sub-inc.ent">is a test
|
||||
</sub-inc></this>
|
||||
|
6
uri.c
6
uri.c
@ -2068,7 +2068,11 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
|
||||
* First we compare the two strings and find where they first differ
|
||||
*/
|
||||
bptr = (xmlChar *)bas->path;
|
||||
if ((*bptr == '/') && (ref->path[0] != '/'))
|
||||
if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/'))
|
||||
pos += 2;
|
||||
if ((*bptr == '.') && (bptr[1] == '/'))
|
||||
bptr += 2;
|
||||
else if ((*bptr == '/') && (ref->path[pos] != '/'))
|
||||
bptr++;
|
||||
while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0))
|
||||
pos++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user