diff options
| author | Augie Fackler <augie@google.com> | 2023-04-28 18:37:26 -0400 |
|---|---|---|
| committer | Augie Fackler <augie@google.com> | 2023-04-28 18:37:26 -0400 |
| commit | 58537cde0607eb3ca4076e00b8e2cfac52827ca1 (patch) | |
| tree | 0df496be0a46f4c4d26e60a6d7e3cb2ec40154c2 /library/test/src/formatters | |
| parent | 610f82726172c26d0a9f72fee3d72caad9bdb514 (diff) | |
junit: fix typo in comment and don't include output for passes when not requested
Diffstat (limited to 'library/test/src/formatters')
| -rw-r--r-- | library/test/src/formatters/junit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/test/src/formatters/junit.rs b/library/test/src/formatters/junit.rs index 65883dd36a1..9f5bf24367e 100644 --- a/library/test/src/formatters/junit.rs +++ b/library/test/src/formatters/junit.rs @@ -31,7 +31,7 @@ fn str_to_cdata(s: &str) -> String { // `<?'` in a CDATA block, so the escaping gets a little weird. let escaped_output = s.replace("]]>", "]]]]><![CDATA[>"); let escaped_output = escaped_output.replace("<?", "<]]><![CDATA[?"); - // We also smuggle newlines as 
 so as to keep all the output on line line + // We also smuggle newlines as 
 so as to keep all the output on one line let escaped_output = escaped_output.replace("\n", "]]>
<![CDATA["); // Prune empty CDATA blocks resulting from any escaping let escaped_output = escaped_output.replace("<![CDATA[]]>", ""); @@ -163,7 +163,7 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> { test_name, duration.as_secs_f64() ))?; - if stdout.is_empty() { + if stdout.is_empty() || !state.options.display_output { self.write_message("/>")?; } else { self.write_message("><system-out>")?; |
