diff --git a/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java b/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java index 960f078ee..ab7404292 100755 --- a/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java @@ -43,7 +43,7 @@ public class TestXSSFExportToXML extends TestCase{ public void testExportToXML() throws Exception{ - XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXmlMappings.xlsx"); + XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings.xlsx"); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java b/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java index 465a5beba..e10711e69 100755 --- a/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java @@ -36,7 +36,7 @@ public class TestMapInfo extends TestCase { public void testMapInfoExists() throws Exception { - XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXmlMappings.xlsx"); + XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings.xlsx"); MapInfo mapInfo = null; SingleXmlCells singleXMLCells = null; diff --git a/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java b/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java index 97eefa882..113329265 100644 --- a/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java +++ b/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java @@ -77,8 +77,16 @@ public final class HSSFTestDataSamples { throw new RuntimeException("Sample file '" + sampleFileName + "' 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); } catch (FileNotFoundException e) { throw new RuntimeException(e);