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 a0c1482ff Add PathUtilsTest.testSetReadOnlyFileAbsent()
a0c1482ff is described below
commit a0c1482ff3eb8bcdc7fade8ab56982c03eb13859
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jun 6 15:43:01 2024 -0400
Add PathUtilsTest.testSetReadOnlyFileAbsent()
---
src/test/java/org/apache/commons/io/file/PathUtilsTest.java | 5 +++++
1 file changed, 5 insertions(+)
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 cbf10bd5c..a17bd2af7 100644
--- a/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
+++ b/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
@@ -540,6 +540,11 @@ public class PathUtilsTest extends AbstractTempDirTest {
PathUtils.deleteFile(resolved);
}
+ @Test
+ public void testSetReadOnlyFileAbsent() {
+ assertThrows(IOException.class, () ->
PathUtils.setReadOnly(Paths.get("does-not-exist-at-all-ever-never"), true));
+ }
+
@Test
public void testTouch() throws IOException {
assertThrows(NullPointerException.class, () -> FileUtils.touch(null));