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 cf12941b7 Test current behavior
cf12941b7 is described below

commit cf12941b7ada487ac625df9851a34317cbfe4726
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jun 6 10:18:02 2024 -0400

    Test current behavior
---
 src/test/java/org/apache/commons/io/file/PathUtilsTest.java | 9 ++++++++-
 1 file changed, 8 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 93c23c04c..73a220a0d 100644
--- a/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
+++ b/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
@@ -252,7 +252,14 @@ public class PathUtilsTest extends AbstractTempDirTest {
 
     @Test
     public void testGetDosFileAttributeView() {
+        // dir
         assertNotNull(PathUtils.getDosFileAttributeView(current()));
+        // 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));
     }
 
     @Test
@@ -458,7 +465,7 @@ public class PathUtilsTest extends AbstractTempDirTest {
         assertEquals(expected, PathUtils.readString(path, 
StandardCharsets.UTF_8));
         assertEquals(expected, PathUtils.readString(path, null));
     }
-    
+
     @Test
     public void testSetReadOnlyFile() throws IOException {
         final Path resolved = tempDirPath.resolve("testSetReadOnlyFile.txt");

Reply via email to