From 9a7a963bb278f5a768a4fed83bb029c31474f5b1 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Thu, 6 Jun 2024 10:49:23 -0400 Subject: [PATCH] Adjusty test for macOS --- .../java/org/apache/commons/io/file/PathUtilsTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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));