Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
brmmm3 committed Oct 26, 2024
1 parent 12926f8 commit 706e60b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scandir/tests/scandir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ fn test_scandir() -> Result<(), Error> {
ScandirResult::DirEntry(d) => {
assert_eq!("dir1", &d.path);
assert!(d.is_dir);
#[cfg(unix)]
#[cfg(target_os = "linux")]
assert_eq!(4096, d.st_size);
#[cfg(target_os = "macos")]
assert_eq!(96, d.st_size);
#[cfg(windows)]
assert_eq!(0, d.st_size);
}
Expand All @@ -49,8 +51,10 @@ fn test_scandir_not_skip_hidden() -> Result<(), Error> {
ScandirResult::DirEntry(d) => {
assert!(vec!["dir1", "dir2", "dir3"].contains(&d.path.as_str()));
assert!(d.is_dir);
#[cfg(unix)]
#[cfg(target_os = "linux")]
assert_eq!(4096, d.st_size);
#[cfg(target_os = "macos")]
assert_eq!(96, d.st_size);
#[cfg(windows)]
assert_eq!(0, d.st_size);
}
Expand Down

0 comments on commit 706e60b

Please sign in to comment.