This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 27b094302 Adjusty test for macOS
27b094302 is described below

commit 27b09430298efde3bd4d73de75646de0b336bc28
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jun 6 11:24:09 2024 -0400

    Adjusty test for macOS
---
 src/test/java/org/apache/commons/io/file/PathUtilsTest.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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 30acf45a5..cbf10bd5c 100644
--- a/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
+++ b/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
@@ -254,15 +254,17 @@ public class PathUtilsTest extends AbstractTempDirTest {
     public void testGetDosFileAttributeView() {
         // dir
         final DosFileAttributeView dosFileAttributeView = 
PathUtils.getDosFileAttributeView(current());
+        final Path path = Paths.get("this-file-does-not-exist-at.all");
+        assertFalse(Files.exists(path));
         if (SystemUtils.IS_OS_MAC) {
             assertNull(dosFileAttributeView);
+            // missing file
+            assertNull(PathUtils.getDosFileAttributeView(path));
         } else {
             assertNotNull(dosFileAttributeView);
+            // missing file
+            assertNotNull(PathUtils.getDosFileAttributeView(path));
         }
-        // missing file
-        final Path path = Paths.get("this-file-does-not-exist-at.all");
-        assertFalse(Files.exists(path));
-        assertNotNull(PathUtils.getDosFileAttributeView(path));
         // null
         assertThrows(NullPointerException.class, () -> 
PathUtils.getDosFileAttributeView(null));
     }

Reply via email to