Compare commits

...

2 Commits

Author SHA1 Message Date
Looly
a3a7622419 add ai to bom 2025-11-05 18:05:50 +08:00
Looly
1fac9525ab add test 2025-10-29 23:26:17 +08:00
2 changed files with 38 additions and 0 deletions

View File

@ -95,6 +95,11 @@
<artifactId>hutool-swing</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>hutool-ai</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
@ -147,6 +152,10 @@
<groupId>${project.parent.groupId}</groupId>
<artifactId>hutool-swing</artifactId>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>hutool-ai</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,29 @@
package cn.hutool.v7.core.io.file;
import cn.hutool.v7.core.io.IORuntimeException;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
public class Issue4121Test {
@Test
void testListFileNames_NonExistentDirectory() {
assertThrows(IORuntimeException.class, () -> {
FileUtil.listFileNames("/non/existent/path");
});
}
@Test
void testListFileNames_RelativePath() {
// 测试相对路径相对于classpath
List<String> result = FileUtil.listFileNames("META-INF");
assertEquals(3, result.size());
assertTrue(result.contains("MANIFEST.MF"));
assertTrue(result.contains("LICENSE-notice.md"));
assertTrue(result.contains("LICENSE.md"));
}
}