Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion library/test/src/formatters/junit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ impl<T: Write> JunitFormatter<T> {
impl<T: Write> OutputFormatter for JunitFormatter<T> {
fn write_run_start(&mut self, _test_count: usize) -> io::Result<()> {
// We write xml header on run start
self.write_message(&"<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
self.out.write_all("\n".as_bytes())?;
self.write_message("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
}

fn write_test_start(&mut self, _desc: &TestDesc) -> io::Result<()> {
Expand Down Expand Up @@ -133,6 +134,8 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
self.write_message("</testsuite>")?;
self.write_message("</testsuites>")?;

self.out.write_all("\n\n".as_bytes())?;

Ok(state.failed == 0)
}
}
Expand Down