修改格式化
This commit is contained in:
parent
1cfad85561
commit
99e527e9b4
@ -154,7 +154,7 @@ public class FileUtils {
|
||||
}
|
||||
|
||||
public static void createPoiFilesDirectory() {
|
||||
TempFile.setTempFileCreationStrategy(new EasyExcelTempFileCreationStrategy());
|
||||
//TempFile.setTempFileCreationStrategy(new EasyExcelTempFileCreationStrategy());
|
||||
}
|
||||
|
||||
public static File createCacheTmpFile() {
|
||||
|
@ -74,7 +74,7 @@
|
||||
<includes>
|
||||
<include>/com/alibaba/easyexcel/test/core/**/*.java</include>
|
||||
</includes>
|
||||
<testFailureIgnore>true</testFailureIgnore>
|
||||
<testFailureIgnore>false</testFailureIgnore>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
@ -13,6 +13,7 @@ import lombok.Setter;
|
||||
public class DateFormatData {
|
||||
private String date;
|
||||
private String dateStringCn;
|
||||
private String dateStringCn2;
|
||||
private String dateStringUs;
|
||||
private String number;
|
||||
private String numberStringCn;
|
||||
|
@ -3,6 +3,7 @@ package com.alibaba.easyexcel.test.core.dataformat;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.alibaba.easyexcel.test.util.TestFileUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
@ -54,7 +55,12 @@ public class DateFormatTest {
|
||||
}
|
||||
}
|
||||
for (DateFormatData data : list) {
|
||||
Assertions.assertEquals(data.getDateStringCn(), data.getDate());
|
||||
// The way dates are read in Chinese is different on Linux and Mac, so it is acceptable if it matches either one.
|
||||
// For example, on Linux: 1-Jan -> 1-1月
|
||||
// On Mac: 1-Jan -> 1-一月
|
||||
Assertions.assertTrue(
|
||||
Objects.equals(data.getDateStringCn(), data.getDate()) || Objects.equals(data.getDateStringCn2(),
|
||||
data.getDate()));
|
||||
Assertions.assertEquals(data.getNumberStringCn(), data.getNumber());
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user