Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
aleury committed Sep 2, 2024
1 parent ca585d9 commit 2c6283f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ impl Iterator for FileIter {

#[cfg(test)]
mod test {
use std::path::PathBuf;
use super::{from_path, File};

#[test]
Expand Down Expand Up @@ -120,10 +121,10 @@ mod test {
#[test]
fn from_path_returns_iterator_over_files_in_the_given_path() {
let want = vec![
File::new("./testdata/en/hello.txt", 6),
File::new("./testdata/en/world.txt", 7),
File::new("./testdata/es/hola.txt", 5),
File::new("./testdata/es/mundo.txt", 6),
File::new(PathBuf::from("./testdata/en/hello.txt"), 6),
File::new(PathBuf::from("./testdata/en/world.txt"), 7),
File::new(PathBuf::from("./testdata/es/hola.txt"), 5),
File::new(PathBuf::from("./testdata/es/mundo.txt"), 6),
];
let mut got = from_path("./testdata").unwrap().collect::<Vec<_>>();
// Sort by path for consistent ordering.
Expand Down

0 comments on commit 2c6283f

Please sign in to comment.