diff --git a/src/test/java/org/apache/commons/io/file/PathUtilsTest.java b/src/test/java/org/apache/commons/io/file/PathUtilsTest.java index 73a220a0d6d..92d1fe2e0a4 100644 --- a/src/test/java/org/apache/commons/io/file/PathUtilsTest.java +++ b/src/test/java/org/apache/commons/io/file/PathUtilsTest.java @@ -253,7 +253,12 @@ public void testGetBaseNamePathCornerCases() { @Test public void testGetDosFileAttributeView() { // dir - assertNotNull(PathUtils.getDosFileAttributeView(current())); + final DosFileAttributeView dosFileAttributeView = PathUtils.getDosFileAttributeView(current()); + if (SystemUtils.IS_OS_MAC) { + assertNull(dosFileAttributeView); + } else { + assertNotNull(dosFileAttributeView); + } // missing file final Path path = Paths.get("this-file-does-not-exist-at.all"); assertFalse(Files.exists(path));