diff --git a/src/test/java/org/apache/commons/io/FileUtilsListFilesTest.java b/src/test/java/org/apache/commons/io/FileUtilsListFilesTest.java index 926f67fa362..cee9b50def4 100644 --- a/src/test/java/org/apache/commons/io/FileUtilsListFilesTest.java +++ b/src/test/java/org/apache/commons/io/FileUtilsListFilesTest.java @@ -212,6 +212,11 @@ public void testListFilesByExtension() { assertFalse(fileNames.contains("dummy-indexhtml")); } + @Test + public void testListFilesMissing() { + assertTrue(FileUtils.listFiles(new File(temporaryFolder, "dir/does/not/exist/at/all"), null, false).isEmpty()); + } + @Test public void testListFilesWithDeletion() throws IOException { final String[] extensions = {"xml", "txt"};