1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-20 03:52:25 +03:00

when output and expected do not match exactly run diff to put the

* check-xinclude-test-suite.py: when output and expected do not match
  exactly run diff to put the differences in the log c.f. #148691
Daniel
This commit is contained in:
Daniel Veillard
2004-09-06 09:54:35 +00:00
parent 9d2674960c
commit 8b7967c340
2 changed files with 13 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
Mon Sep 6 11:52:50 CEST 2004 Daniel Veillard <daniel@veillard.com>
* check-xinclude-test-suite.py: when output and expected do not match
exactly run diff to put the differences in the log c.f. #148691
Mon Sep 6 11:17:35 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
* xstc/xstc-to-python.xslt xstc/ms-test-def.xml xstc/nist-test-def.xml

View File

@@ -82,6 +82,8 @@ def runTest(test, basedir):
return -1
expected = None
outputfile = None
diff = None
if type != 'error':
output = test.xpathEval('string(output)')
if output == 'No output file.':
@@ -98,6 +100,7 @@ def runTest(test, basedir):
try:
f = open(output)
expected = f.read()
outputfile = output
except:
print "Result for %s unreadable: %s" % (id, output)
@@ -112,6 +115,8 @@ def runTest(test, basedir):
result = doc.serialize()
if result != expected:
print "Result for %s differs" % (id)
open("xinclude.res", "w").write(result)
diff = os.popen("diff %s xinclude.res" % outputfile).read()
doc.freeDoc()
else:
@@ -157,6 +162,9 @@ def runTest(test, basedir):
log.write(" ----\n%s ----\n" % (error_msg))
error_msg = ''
log.write("\n")
if diff != None:
log.write("diff from test %s:\n" %(id))
log.write(" -----------\n%s\n -----------\n" % (diff));
return 0