about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSerg Tereshchenko <serg.partizan@gmail.com>2022-02-01 21:41:24 +0200
committerSerg Tereshchenko <serg.partizan@gmail.com>2022-02-02 22:14:03 +0200
commit088474a408c19180badba6705367520daf4efc2b (patch)
treeb9647fe56783151a7a347e6b7aeaeff0e2b9e793
parent686663a49e57870c78a4cd047f23a44175fc67a4 (diff)
downloadrust-088474a408c19180badba6705367520daf4efc2b.tar.gz
rust-088474a408c19180badba6705367520daf4efc2b.zip
fix: Remove extra newlines from junit output
-rw-r--r--library/test/src/formatters/junit.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/test/src/formatters/junit.rs b/library/test/src/formatters/junit.rs
index fa23cf26896..f940a9ff8f1 100644
--- a/library/test/src/formatters/junit.rs
+++ b/library/test/src/formatters/junit.rs
@@ -33,7 +33,6 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
         _shuffle_seed: Option<u64>,
     ) -> io::Result<()> {
         // We write xml header on run start
-        self.out.write_all(b"\n")?;
         self.write_message("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
     }
 
@@ -138,7 +137,7 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
         self.write_message("</testsuite>")?;
         self.write_message("</testsuites>")?;
 
-        self.out.write_all(b"\n\n")?;
+        self.out.write_all(b"\n")?;
 
         Ok(state.failed == 0)
     }