mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-17 02:08:28 +00:00
s/test_dir/test_suite_dir
This should make the code slightly more understandable
This commit is contained in:
parent
6b37932268
commit
69090550cb
1 changed files with 4 additions and 4 deletions
|
@ -17,18 +17,18 @@ pub static CARGO_TARGET_DIR: SyncLazy<PathBuf> = SyncLazy::new(|| match env::var
|
|||
});
|
||||
|
||||
pub fn bless() {
|
||||
let test_dirs = [
|
||||
let test_suite_dirs = [
|
||||
clippy_project_root().join("tests").join("ui"),
|
||||
clippy_project_root().join("tests").join("ui-toml"),
|
||||
clippy_project_root().join("tests").join("ui-cargo"),
|
||||
];
|
||||
for test_dir in &test_dirs {
|
||||
WalkDir::new(test_dir)
|
||||
for test_suite_dir in &test_suite_dirs {
|
||||
WalkDir::new(test_suite_dir)
|
||||
.into_iter()
|
||||
.filter_map(Result::ok)
|
||||
.filter(|f| f.path().extension() == Some(OsStr::new("rs")))
|
||||
.for_each(|f| {
|
||||
let test_name = f.path().strip_prefix(test_dir).unwrap();
|
||||
let test_name = f.path().strip_prefix(test_suite_dir).unwrap();
|
||||
|
||||
update_reference_file(f.path().with_extension("stdout"), test_name.with_extension("stdout"));
|
||||
update_reference_file(f.path().with_extension("stderr"), test_name.with_extension("stderr"));
|
||||
|
|
Loading…
Reference in a new issue