You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_runner: junit reporter writes raw C0 control characters (e.g. ANSI color codes), producing invalid XML #67155
xmllint rejects the file: the <failure> message contains raw ANSI escape bytes (U+001B) from the colored assertion diff. XML 1.0 forbids C0 control characters other than tab, LF and CR, even as numeric character references ( is also illegal), so JUnit consumers reject the whole report.
Additional information
lib/internal/test_runner/reporter/junit.js escapes only &, <, " and newlines. Any C0 control character in a test name, failure message or stack is written as-is. Colored assertion diffs are the common trigger (child processes get FORCE_COLOR=1 when the runner's destination is a color terminal), but a test name or error string containing \x1b or \x00 produces the same invalid file. The reporter would need to strip or replace these characters rather than escape them.
Related: #67149 (a different junit reporter output defect, <undefined> elements after truncated results).
Activity