Unit tests and clean up for dupe file feature
This commit is contained in:
parent
14d485a7cb
commit
ef32539aae
5 changed files with 238 additions and 28 deletions
10
src/app.rs
10
src/app.rs
|
|
@ -2383,6 +2383,16 @@ pub(crate) mod test_utils {
|
|||
}))
|
||||
}
|
||||
|
||||
// Filter `path` for files
|
||||
pub fn filter_files(path: &Path) -> io::Result<impl Iterator<Item = PathBuf>> {
|
||||
Ok(path.read_dir()?.filter_map(|entry| {
|
||||
entry.ok().and_then(|entry| {
|
||||
let path = entry.path();
|
||||
path.is_file().then_some(path)
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
/// Boiler plate for Tab tests
|
||||
pub fn tab_click_new(
|
||||
files: usize,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue