aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2009-07-16 10:44:01 +0000
committerYegor Kozlov <yegor@apache.org>2009-07-16 10:44:01 +0000
commiteda8d9631c316fcc1ff9f2e28887ea6a53995ef9 (patch)
tree2b57f5d30e3e5b8d500103f1edf55f3aa391b434 /src/testcases/org/apache/poi
parent090bcd474ef17e77ad0b73cac0eca274273675bf (diff)
downloadpoi-eda8d9631c316fcc1ff9f2e28887ea6a53995ef9.tar.gz
poi-eda8d9631c316fcc1ff9f2e28887ea6a53995ef9.zip
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
Diffstat (limited to 'src/testcases/org/apache/poi')
-rw-r--r--src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java b/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java
index 97eefa8826..113329265f 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);