poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r794621 - in /poi/trunk/src: ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java testcases/org/apache/poi/hssf/HSSFTestDataSamples.java
Date Thu, 16 Jul 2009 10:44:01 GMT
Author: yegor
Date: Thu Jul 16 10:44:01 2009
New Revision: 794621

URL: http://svn.apache.org/viewvc?rev=794621&view=rev
Log:
fixed case-sensitive file names in unit tests for Bugzilla 47520

Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java
    poi/trunk/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java?rev=794621&r1=794620&r2=794621&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java Thu
Jul 16 10:44:01 2009
@@ -43,7 +43,7 @@
 	public void testExportToXML() throws Exception{
 	
 		
-		 XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXmlMappings.xlsx");
+		 XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings.xlsx");
 		  
 		 
 		 

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java?rev=794621&r1=794620&r2=794621&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java Thu Jul 16 10:44:01
2009
@@ -36,7 +36,7 @@
     public void testMapInfoExists() throws Exception {
 
 
-        XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXmlMappings.xlsx");
+        XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings.xlsx");
 
         MapInfo mapInfo = null;
         SingleXmlCells singleXMLCells = null;

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java?rev=794621&r1=794620&r2=794621&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java Thu Jul 16 10:44:01
2009
@@ -77,8 +77,16 @@
 			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);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message