bachp / junit-report-rs

JUnit compatible XML reports in Rust
MIT License
24 stars 20 forks source link

Newlines are not possible to be encoded #66

Open def- opened 2 weeks ago

def- commented 2 weeks ago

Newlines in the message of a junit_report::TestCase::failure() are stored in the XML as straight newlines. When parsing the XML (for example with python-junit-xml) they are automatically stripped. Instead the newline should be encoded as 
.

As a workaround I tried &error.to_string().replace("\n", "
"), but the 
 is then encoded as 


bachp commented 1 week ago

@def- Could you provide a test case that failes?

def- commented 1 week ago

Sure: https://github.com/bachp/junit-report-rs/pull/68