Fix #125 invalid character (backspace) in output#235
Conversation
|
Just ran the change on our CI and it looks like it still reports the error even though the XML file only contains the HTML entities. Will check why... |
|
So it looks like even though the XML contains only the HTML entities, it's not possible to parse the file. Replacing the backspace characters Should we go with this solution? |
|
replace \x08 with empty string doesn't sounds good. how about replace \x08 with \\x08. To add a unit test, check https://github.com/linkedin/bluepill/blob/master/Bluepill-cli/BPInstanceTests/BPTreeParserTests.m |
|
we have the same issue, so I search a bit and found this: valid characters are [\u0009\u000a\u000d\u0020-\uD7FF\uE000-\uFFFD] I would propose to go through each character, and if you find them not being valid (see regex) then replace them with their escaped value as olverhu suggested for the \x08 case. |
|
/azp run |
|
Pull request contains merge conflicts. |
|
Is this still an issue? |
If you clear text in a UITest by pressing backspace, Xcode logs output into console with the UTF-8 character
\x08.This results into the following error message when parsing JUnit output:
To fix this, I’ve replaced the character with the HTML Entity counterpart:
This fixes #125.
As I didn’t write any production Objective-C code yet as I started with Swift only please let me know if there’s anything I can improve or needs to be changed.
I couldn’t find any specific unit test for this method to adjust. If there is any I would try to make it test my change. Otherwise I could also provide an XML file with one test case where this specific problem occurs.