You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2020/12/30 21:40:02 UTC

svn commit: r1884957 - in /poi/trunk: src/integrationtest/org/apache/poi/stress/TestAllFiles.java src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java test-data/spreadsheet/64759.xlsx

Author: centic
Date: Wed Dec 30 21:40:01 2020
New Revision: 1884957

URL: http://svn.apache.org/viewvc?rev=1884957&view=rev
Log:
Add unfixed test for bug 64759 and make the ones fail which depend on manual opening of files in Microsoft Excel for verification

Added:
    poi/trunk/test-data/spreadsheet/64759.xlsx
Modified:
    poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java

Modified: poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java?rev=1884957&r1=1884956&r2=1884957&view=diff
==============================================================================
--- poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java (original)
+++ poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java Wed Dec 30 21:40:01 2020
@@ -251,6 +251,7 @@ public class TestAllFiles {
     private static final Set<String> EXPECTED_FAILURES = unmodifiableHashSet(
         // password protected files without known password
         "spreadsheet/51832.xls",
+        "spreadsheet/64759.xlsx",
         "document/PasswordProtected.doc",
 
         // TODO: fails XMLExportTest, is this ok?

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java?rev=1884957&r1=1884956&r2=1884957&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java Wed Dec 30 21:40:01 2020
@@ -21,6 +21,7 @@ import static org.junit.jupiter.api.Asse
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -217,6 +218,8 @@ public final class TestUnfixedBugs {
             // write to file for manual inspection
             XSSFTestDataSamples.writeOut(wb, "bug 55752 for review");
         }
+
+        fail("Test runs ok, but the resulting file is incorrectly formatted");
     }
 
     @Test
@@ -248,6 +251,8 @@ public final class TestUnfixedBugs {
         checkRows57423(wbBack.getSheetAt(0));
 
         wbBack.close();
+
+        fail("Excel reports that the workbook is corrupt");
     }
 
     private void checkRows57423(Sheet testSheet) throws IOException {
@@ -326,6 +331,8 @@ public final class TestUnfixedBugs {
             // LibreOffice doesn't complain when rows are not in ascending order
 
             wbBack.close();
+
+            fail("Excel reports that the workbook is corrupt, LibreOffice can read it");
         }
     }
 
@@ -387,4 +394,12 @@ public final class TestUnfixedBugs {
         }
 
     }
+
+    @Test
+    public void testBug64759() throws IOException {
+        try (Workbook wb = XSSFTestDataSamples.openSampleWorkbook("64759.xlsx")) {
+            Sheet cloned = wb.cloneSheet(0);
+            assertNotNull(cloned);
+        }
+    }
 }

Added: poi/trunk/test-data/spreadsheet/64759.xlsx
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/64759.xlsx?rev=1884957&view=auto
==============================================================================
Binary files poi/trunk/test-data/spreadsheet/64759.xlsx (added) and poi/trunk/test-data/spreadsheet/64759.xlsx Wed Dec 30 21:40:01 2020 differ



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