1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-01 10:06:59 +03:00

more testing on the Relax-NG front, cleaning up the regression tests

* check-relaxng-test-suite.py relaxng.c: more testing on the
  Relax-NG front, cleaning up the regression tests failures
  current state and I forgot support for "mixed":
  found 373 test schemas: 280 success 93 failures
  found 529 test instances: 401 success 68 failures
* tree.c include/libxml/tree.h xmlschemastypes.c: finished and
  moved the Name, NCName and QName validation routine in tree.c
* uri.c: fixed handling of URI ending up with #, i.e. having
  an empty fragment ID.
* result/relaxng/*: updated the results
Daniel
This commit is contained in:
Daniel Veillard
2003-02-14 16:54:11 +00:00
parent 9a237c9d26
commit d2298791af
37 changed files with 728 additions and 232 deletions

View File

@ -45,7 +45,6 @@ def resolver(URL, ID, ctxt):
log.write("resources: %s\n" % (resources))
return None
libxml2.setEntityLoader(resolver)
#
# handle a valid instance
@ -235,7 +234,6 @@ def handle_dir(node, dir):
for r in res:
handle_resource(r, name)
#
# handle a testCase element
#
@ -285,7 +283,17 @@ def handle_testCase(node):
#
# handle a testSuite element
#
def handle_testSuite(node):
def handle_testSuite(node, level = 0):
global nb_schemas_tests, nb_schemas_success, nb_schemas_failed
global nb_instances_tests, nb_instances_success, nb_instances_failed
if level >= 1:
old_schemas_tests = nb_schemas_tests
old_schemas_success = nb_schemas_success
old_schemas_failed = nb_schemas_failed
old_instances_tests = nb_instances_tests
old_instances_success = nb_instances_success
old_instances_failed = nb_instances_failed
docs = node.xpathEval('documentation')
authors = node.xpathEval('author')
if docs != []:
@ -306,13 +314,26 @@ def handle_testSuite(node):
for test in node.xpathEval('testCase'):
handle_testCase(test)
for test in node.xpathEval('testSuite'):
handle_testSuite(test)
handle_testSuite(test, level + 1)
if level >= 1 and sections != []:
if nb_schemas_tests != old_schemas_tests:
print "found %d test schemas: %d success %d failures" % (
nb_schemas_tests - old_schemas_tests,
nb_schemas_success - old_schemas_success,
nb_schemas_failed - old_schemas_failed)
if nb_instances_tests != old_instances_tests:
print "found %d test instances: %d success %d failures" % (
nb_instances_tests - old_instances_tests,
nb_instances_success - old_instances_success,
nb_instances_failed - old_instances_failed)
#
# Parse the conf file
#
libxml2.substituteEntitiesDefault(1);
testsuite = libxml2.parseFile(CONF)
libxml2.setEntityLoader(resolver)
root = testsuite.getRootElement()
if root.name != 'testSuite':
print "%s doesn't start with a testSuite element, aborting" % (CONF)