Delete non-revision ui test output file if revisions are used
This commit is contained in:
parent
5553301137
commit
19dce738f9
1 changed files with 7 additions and 0 deletions
|
@ -3761,6 +3761,13 @@ impl<'test> TestCx<'test> {
|
|||
|
||||
let mut files = vec![output_file];
|
||||
if self.config.bless {
|
||||
// Delete non-revision .stderr/.stdout file if revisions are used.
|
||||
// Without this, we'd just generate the new files and leave the old files around.
|
||||
if self.revision.is_some() {
|
||||
let old =
|
||||
expected_output_path(self.testpaths, None, &self.config.compare_mode, kind);
|
||||
self.delete_file(&old);
|
||||
}
|
||||
files.push(expected_output_path(
|
||||
self.testpaths,
|
||||
self.revision,
|
||||
|
|
Loading…
Add table
Reference in a new issue