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:
@@ -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>
|
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
|
* xstc/xstc-to-python.xslt xstc/ms-test-def.xml xstc/nist-test-def.xml
|
||||||
|
@@ -82,6 +82,8 @@ def runTest(test, basedir):
|
|||||||
return -1
|
return -1
|
||||||
|
|
||||||
expected = None
|
expected = None
|
||||||
|
outputfile = None
|
||||||
|
diff = None
|
||||||
if type != 'error':
|
if type != 'error':
|
||||||
output = test.xpathEval('string(output)')
|
output = test.xpathEval('string(output)')
|
||||||
if output == 'No output file.':
|
if output == 'No output file.':
|
||||||
@@ -98,6 +100,7 @@ def runTest(test, basedir):
|
|||||||
try:
|
try:
|
||||||
f = open(output)
|
f = open(output)
|
||||||
expected = f.read()
|
expected = f.read()
|
||||||
|
outputfile = output
|
||||||
except:
|
except:
|
||||||
print "Result for %s unreadable: %s" % (id, output)
|
print "Result for %s unreadable: %s" % (id, output)
|
||||||
|
|
||||||
@@ -112,6 +115,8 @@ def runTest(test, basedir):
|
|||||||
result = doc.serialize()
|
result = doc.serialize()
|
||||||
if result != expected:
|
if result != expected:
|
||||||
print "Result for %s differs" % (id)
|
print "Result for %s differs" % (id)
|
||||||
|
open("xinclude.res", "w").write(result)
|
||||||
|
diff = os.popen("diff %s xinclude.res" % outputfile).read()
|
||||||
|
|
||||||
doc.freeDoc()
|
doc.freeDoc()
|
||||||
else:
|
else:
|
||||||
@@ -157,6 +162,9 @@ def runTest(test, basedir):
|
|||||||
log.write(" ----\n%s ----\n" % (error_msg))
|
log.write(" ----\n%s ----\n" % (error_msg))
|
||||||
error_msg = ''
|
error_msg = ''
|
||||||
log.write("\n")
|
log.write("\n")
|
||||||
|
if diff != None:
|
||||||
|
log.write("diff from test %s:\n" %(id))
|
||||||
|
log.write(" -----------\n%s\n -----------\n" % (diff));
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user