diff --git a/tools/extracttests.py b/tools/extracttests.py index 5469e5c0c..16f63cb3b 100755 --- a/tools/extracttests.py +++ b/tools/extracttests.py @@ -63,6 +63,44 @@ def trimname(name): return name +def writeHtmlFile(nodes, functionName, filename, errorsOnly): + fout = open(filename, 'w') + fout.write('\n') + fout.write('
\n') + fout.write(' \n') + fout.write('\n') + fout.write('\n') + + testclass = None + num = 0 + for node in nodes: + if errorsOnly and node['expected']=='': + continue + if trimname(node['functionName']) == functionName: + num = num + 1 + + if not testclass: + testclass = node['testclass'] + fout.write('Nr | Code | Expected |
---|---|---|
' + str(num) + ' | ') + fout.write('' + strtoxml(node['code']).replace('\\n', '\n') + ' | ')
+ fout.write('' + strtoxml(node['expected']).replace('\\n', ' ') + ' | ')
+ fout.write('
Name | Number | |
---|---|---|
Name | Errors | All |
'+functionname+' | ') - num = 0 + findex.write('||
'+functionname+' | ') + numall = 0 + numerr = 0 for node in e.nodes: if trimname(node['functionName']) == functionname: - num = num + 1 - findex.write('' + str(num) + ' | 0 | ')
+ else:
+ findex.write('' + str(numerr) + ' | ')
+ findex.write('' + str(numall) + ' | ')
+ findex.write('\n')
findex.write('
Nr | Code | Expected |
---|---|---|
' + str(num) + ' | ') - fout.write('' + strtoxml(node['code']).replace('\\n', '\n') + ' | ')
- fout.write('' + strtoxml(node['expected']).replace('\\n', ' ') + ' | ')
- fout.write('