This commit is contained in:
Looly
2023-03-29 13:57:17 +08:00
parent 27e1f5f61e
commit bb1d65ff97
4 changed files with 33 additions and 15 deletions

View File

@@ -0,0 +1,14 @@
package cn.hutool.core.io;
import cn.hutool.core.io.file.FileUtil;
import org.junit.Assert;
import org.junit.Test;
public class BomReaderTest {
@Test
public void readTest() {
final BomReader bomReader = FileUtil.getBOMReader(FileUtil.file("with_bom.txt"));
final String read = IoUtil.read(bomReader, true);
Assert.assertEquals("此文本包含BOM头信息用于测试BOM头读取", read);
}
}

View File

@@ -0,0 +1 @@
此文本包含BOM头信息用于测试BOM头读取