Skip to content

Commit c752a9f

Browse files
committed
junit: fix typo in comment and don't include output for passes when not requested
1 parent ff573fb commit c752a9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/src/formatters/junit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn str_to_cdata(s: &str) -> String {
3131
// `<?'` in a CDATA block, so the escaping gets a little weird.
3232
let escaped_output = s.replace("]]>", "]]]]><![CDATA[>");
3333
let escaped_output = escaped_output.replace("<?", "<]]><![CDATA[?");
34-
// We also smuggle newlines as &#xa so as to keep all the output on line line
34+
// We also smuggle newlines as &#xa so as to keep all the output on one line
3535
let escaped_output = escaped_output.replace("\n", "]]>&#xA;<![CDATA[");
3636
// Prune empty CDATA blocks resulting from any escaping
3737
let escaped_output = escaped_output.replace("<![CDATA[]]>", "");
@@ -163,7 +163,7 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
163163
test_name,
164164
duration.as_secs_f64()
165165
))?;
166-
if stdout.is_empty() {
166+
if stdout.is_empty() || !state.options.display_output {
167167
self.write_message("/>")?;
168168
} else {
169169
self.write_message("><system-out>")?;

0 commit comments

Comments
 (0)