From 706e60b601fba641c43e826f26f162156f2f3bef Mon Sep 17 00:00:00 2001 From: Martin Bammer Date: Sat, 26 Oct 2024 08:28:38 +0200 Subject: [PATCH] test --- scandir/tests/scandir.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scandir/tests/scandir.rs b/scandir/tests/scandir.rs index a1bcf5f..8572b3d 100644 --- a/scandir/tests/scandir.rs +++ b/scandir/tests/scandir.rs @@ -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); } @@ -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); }