-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
test_runner: fix line feed escaping in JUnit #60274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_runner: fix line feed escaping in JUnit #60274
Conversation
Replaces line feed characters with the correct character reference in XML attribute values.
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #60274 +/- ##
==========================================
+ Coverage 88.56% 88.57% +0.01%
==========================================
Files 704 704
Lines 208323 208323
Branches 40033 40039 +6
==========================================
+ Hits 184501 184531 +30
+ Misses 15854 15806 -48
- Partials 7968 7986 +18
🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
|
@atlowChemi Hello, thank you for the review. Do I need to fix something for this PR to land? |
|
Landed in d255fc7 |
Nope, sorry this had gone silent and thanks for the ping! |
Replaces line feed characters with the correct character reference in XML attribute values. PR-URL: #60274 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Fixes #59593 (a part related to the XML
failure:messageattribute value)Cause
In
escapeAttributeline feed characters were simply removed, so multi-line messages were distorted in the report, like:However, the original message is:
Solution motivation
https://www.w3.org/TR/WD-xml-970807#sec3.3.3
Thus, the character reference
must be expanded by the XML report processor/application to the line feed character.Changes
I used the decimal code
as a decimal one is already used inescapeComment./(&)(?!#\d{1,7};)/ginescapeContentprevents escaping&in decimal character references.Updated the test snapshot.
Effect
Testing
Additional details
I haven't removed
testcase:failureas it's submitted via #59685