Problem
--report-html lists test name, status and duration, and nothing else. For the same run, the Markdown report gives:
## Failures
### Bad
`cmp_test.sh:2`
✗ Failed: Bad
Expected 'want'
but got 'got'
at cmp_test.sh:2
while the HTML report gives:
Bad failed 15
Good passed 11
JUnit carries the message in <failure>, JSON in .message, TAP in its YAML block, Markdown in a fenced block. HTML is the only format that drops it — and it is the one people open in a browser precisely to find out what broke, so it is the one where the omission costs most.
Proposal
Add a Failures section after the per-file tables, shaped like the Markdown report's: test name, file:line, and the message in a <pre> block. Only for runs that have failures, so a green report does not grow an empty heading.
The message is user text and goes through the same escaping as #1249, since a failure comparing <b>want</b> against <i>got</i> would otherwise inject markup exactly as a title did.
Note on the escaping
The per-test rows are escaped in a single awk pass because they are numerous and single-line. Failure messages are few and multi-line, so they use a small __html_escape helper — one fork per failure at report time. Same awk/gsub approach for the reason recorded in #1096, and the same one src/coverage/html_file.sh already uses.
Problem
--report-htmllists test name, status and duration, and nothing else. For the same run, the Markdown report gives:✗ Failed: Bad
Expected 'want'
but got 'got'
at cmp_test.sh:2
while the HTML report gives:
JUnit carries the message in
<failure>, JSON in.message, TAP in its YAML block, Markdown in a fenced block. HTML is the only format that drops it — and it is the one people open in a browser precisely to find out what broke, so it is the one where the omission costs most.Proposal
Add a
Failuressection after the per-file tables, shaped like the Markdown report's: test name,file:line, and the message in a<pre>block. Only for runs that have failures, so a green report does not grow an empty heading.The message is user text and goes through the same escaping as #1249, since a failure comparing
<b>want</b>against<i>got</i>would otherwise inject markup exactly as a title did.Note on the escaping
The per-test rows are escaped in a single
awkpass because they are numerous and single-line. Failure messages are few and multi-line, so they use a small__html_escapehelper — one fork per failure at report time. Sameawk/gsubapproach for the reason recorded in #1096, and the same onesrc/coverage/html_file.shalready uses.