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 71c067a6c Mark Windows-only tests
71c067a6c is described below
commit 71c067a6c65103b3313461b935b6c386e85233e7
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Mar 21 21:37:15 2024 -0400
Mark Windows-only tests
Comment
---
src/test/java/org/apache/commons/io/FileSystemUtilsTest.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/test/java/org/apache/commons/io/FileSystemUtilsTest.java
b/src/test/java/org/apache/commons/io/FileSystemUtilsTest.java
index b6af69ae9..74505649b 100644
--- a/src/test/java/org/apache/commons/io/FileSystemUtilsTest.java
+++ b/src/test/java/org/apache/commons/io/FileSystemUtilsTest.java
@@ -31,6 +31,8 @@ import java.time.Duration;
import java.util.Locale;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
@@ -63,6 +65,7 @@ public class FileSystemUtilsTest {
return new Process() {
@Override
public void destroy() {
+ // nnop
}
@Override
@@ -338,12 +341,14 @@ public class FileSystemUtilsTest {
assertEquals(189416L, fsu.freeSpaceUnix("/", false, false,
NEG_1_TIMEOUT));
}
+ @EnabledOnOs(value = OS.WINDOWS)
@ParameterizedTest
@MethodSource("getIllegalFileNameChars")
public void testGetFreeSpaceWindows_IllegalFileName(final char
illegalFileNameChar) throws Exception {
assertThrows(IllegalArgumentException.class, () -> new
FileSystemUtils().freeSpaceWindows("\\ \"" + illegalFileNameChar,
NEG_1_TIMEOUT));
}
+ @EnabledOnOs(value = OS.WINDOWS)
@Test
public void testGetFreeSpaceWindows_IllegalFileNames() throws Exception {
assertThrows(IllegalArgumentException.class, () -> new
FileSystemUtils().freeSpaceWindows("\\ \"", NEG_1_TIMEOUT));