fixed case-sensitive file names in unit tests for Bugzilla 47520
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@794621 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
13898bc29c
commit
0662f7e862
@ -43,7 +43,7 @@ public class TestXSSFExportToXML extends TestCase{
|
|||||||
public void testExportToXML() throws Exception{
|
public void testExportToXML() throws Exception{
|
||||||
|
|
||||||
|
|
||||||
XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXmlMappings.xlsx");
|
XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings.xlsx");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public class TestMapInfo extends TestCase {
|
|||||||
public void testMapInfoExists() throws Exception {
|
public void testMapInfoExists() throws Exception {
|
||||||
|
|
||||||
|
|
||||||
XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXmlMappings.xlsx");
|
XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings.xlsx");
|
||||||
|
|
||||||
MapInfo mapInfo = null;
|
MapInfo mapInfo = null;
|
||||||
SingleXmlCells singleXMLCells = null;
|
SingleXmlCells singleXMLCells = null;
|
||||||
|
@ -77,8 +77,16 @@ public final class HSSFTestDataSamples {
|
|||||||
throw new RuntimeException("Sample file '" + sampleFileName
|
throw new RuntimeException("Sample file '" + sampleFileName
|
||||||
+ "' not found in data dir '" + _resolvedDataDir.getAbsolutePath() + "'");
|
+ "' not found in data dir '" + _resolvedDataDir.getAbsolutePath() + "'");
|
||||||
}
|
}
|
||||||
// System.out.println("opening " + f.getAbsolutePath());
|
try {
|
||||||
try {
|
if(!sampleFileName.equals(f.getCanonicalFile().getName())){
|
||||||
|
throw new RuntimeException("File name is case-sensitive: requested '" + sampleFileName
|
||||||
|
+ "' but actual file is '" + f.getCanonicalFile().getName() + "'");
|
||||||
|
}
|
||||||
|
} catch (IOException e){
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
return new FileInputStream(f);
|
return new FileInputStream(f);
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user