Skip to content

Commit e92e6c5

Browse files
author
Gary Gregory
committed
testProbeContentType behavior is OS-dependent.
1 parent 85d5318 commit e92e6c5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/test/java/org/apache/commons/io/file/FilesUncheckTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,10 @@ public void testNewOutputStream() {
333333

334334
@Test
335335
public void testProbeContentType() {
336-
assertNull(FilesUncheck.probeContentType(FILE_PATH_EMPTY));
336+
@SuppressWarnings("unused")
337+
final String probeContentType = FilesUncheck.probeContentType(FILE_PATH_EMPTY);
338+
// Empirical: probeContentType is null on Windows
339+
// Empirical: probeContentType is "text/plain" on Ubuntu
337340
assertEquals("text/xml", FilesUncheck.probeContentType(Paths.get("src/test/resources/org/apache/commons/io/testfileBOM.xml")));
338341
}
339342

0 commit comments

Comments
 (0)