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 57e4a9a5 testProbeContentType behavior is OS-dependent.
57e4a9a5 is described below

commit 57e4a9a55115032371ed6a4eeba51e9007edabb5
Author: Gary Gregory <gardgreg...@gmail.com>
AuthorDate: Sun Jul 24 12:51:16 2022 -0400

    testProbeContentType behavior is OS-dependent.
---
 src/test/java/org/apache/commons/io/file/FilesUncheckTest.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/io/file/FilesUncheckTest.java 
b/src/test/java/org/apache/commons/io/file/FilesUncheckTest.java
index e0615003..ab504692 100644
--- a/src/test/java/org/apache/commons/io/file/FilesUncheckTest.java
+++ b/src/test/java/org/apache/commons/io/file/FilesUncheckTest.java
@@ -334,10 +334,12 @@ public class FilesUncheckTest {
     @Test
     public void testProbeContentType() {
         @SuppressWarnings("unused")
-        final String probeContentType = 
FilesUncheck.probeContentType(FILE_PATH_EMPTY);
+        String probeContentType = 
FilesUncheck.probeContentType(FILE_PATH_EMPTY);
         // Empirical: probeContentType is null on Windows
         // Empirical: probeContentType is "text/plain" on Ubuntu
-        assertEquals("text/xml", 
FilesUncheck.probeContentType(Paths.get("src/test/resources/org/apache/commons/io/testfileBOM.xml")));
+        probeContentType = 
FilesUncheck.probeContentType(Paths.get("src/test/resources/org/apache/commons/io/testfileBOM.xml"));
+        assertTrue("text/xml".equals(probeContentType) || 
"application/xml".equals(probeContentType));
+
     }
 
     @Test

Reply via email to