Skip to content

Commit

Permalink
Fix missing newlines in list files
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Sep 11, 2022
1 parent ae6bfe1 commit 7248b76
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl OutputDir {
SummaryOutcome::Unviable => &mut self.unviable_list,
_ => return Ok(()),
};
write!(file, "{}", mutant.format_as_error_message()).context("write to list file")?;
writeln!(file, "{}", mutant.format_as_error_message()).context("write to list file")?;
}
Ok(())
}
Expand Down
1 change: 1 addition & 0 deletions tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ fn well_tested_tree_finds_no_problems() {
.path()
.join("mutants.out/outcomes.json")
.exists());
check_text_list_output(tmp_src_dir.path(), "well_tested_tree_finds_no_problems");
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
source: tests/cli.rs
expression: content
---
src/inside_mod.rs:3: replace outer::inner::name with Default::default()
src/methods.rs:16: replace Foo::double with ()
src/methods.rs:22: replace <impl Display for Foo>::fmt with Ok(Default::default())
src/methods.rs:28: replace <impl Debug for &Foo>::fmt with Ok(Default::default())
src/nested_function.rs:1: replace has_nested with Default::default()
src/nested_function.rs:2: replace has_nested::inner with Default::default()
src/result.rs:5: replace simple_result with Ok(Default::default())
src/result.rs:9: replace error_if_negative with Ok(Default::default())
src/simple_fns.rs:7: replace returns_unit with ()
src/simple_fns.rs:12: replace returns_42u32 with Default::default()
src/simple_fns.rs:17: replace divisible_by_three with true
src/simple_fns.rs:17: replace divisible_by_three with false
src/simple_fns.rs:26: replace double_string with "".into()
src/simple_fns.rs:26: replace double_string with "xyzzy".into()
src/struct_with_lifetime.rs:14: replace Lex<'buf>::buf_len with Default::default()

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tests/cli.rs
expression: content
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tests/cli.rs
expression: content
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tests/cli.rs
expression: content
---

0 comments on commit 7248b76

Please sign in to comment.