mirror of https://github.com/apache/poi.git
Set locale provider to JRE,CLDR for tests to have compatible date formatting in JDK 9+
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1839199 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2f3e388747
commit
636d9495a5
|
@ -138,6 +138,9 @@ subprojects {
|
|||
systemProperties['user.dir'] = workingDir
|
||||
|
||||
systemProperties['POI.testdata.path'] = '../../test-data'
|
||||
|
||||
// this is necessary for JDK 9+ to keep formatting dates the same way as in previous JDK-versions
|
||||
systemProperties['java.locale.providers'] = 'JRE,CLDR'
|
||||
}
|
||||
|
||||
jacoco {
|
||||
|
|
|
@ -69,7 +69,8 @@ public class TestExcelStyleDateFormatter {
|
|||
new StringBuffer(),
|
||||
new FieldPosition(java.text.DateFormat.MONTH_FIELD)).toString();
|
||||
//System.err.println(result + " - " + getUnicode(result.charAt(0)));
|
||||
assertEquals("Failed for locale " + locale + " and date " + testDates.get(i) + ", having: " + result,
|
||||
assertEquals("Failed for locale " + locale + ", provider: " + System.getProperty("java.locale.providers") +
|
||||
" and date " + testDates.get(i) + ", having: " + result,
|
||||
getUnicode(testMap.get(locale).get(i).charAt(0)), getUnicode(result.charAt(0)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue