mirror of https://github.com/apache/poi.git
Add unit test for bug 37625 which verifies that this file can now be loaded
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1613837 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
15476cd981
commit
70695de82e
|
@ -22,6 +22,8 @@ import static org.junit.Assert.assertNotNull;
|
|||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
@ -509,7 +511,7 @@ public final class TestBugs {
|
|||
/* Iterate over slides and extract text */
|
||||
for( Slide slide : _slides ) {
|
||||
HeadersFooters hf = slide.getHeadersFooters();
|
||||
boolean visible = hf.isHeaderVisible(); // exception happens here
|
||||
/*boolean visible =*/ hf.isHeaderVisible(); // exception happens here
|
||||
}
|
||||
assertTrue("No Exceptions while reading headers", true);
|
||||
}
|
||||
|
@ -547,4 +549,19 @@ public final class TestBugs {
|
|||
}
|
||||
assertEquals(1, str);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void bug37625() throws IOException {
|
||||
InputStream inputStream = new FileInputStream(_slTests.getFile("37625.ppt"));
|
||||
try {
|
||||
SlideShow slideShow = new SlideShow(inputStream);
|
||||
assertEquals(29, slideShow.getSlides().length);
|
||||
|
||||
SlideShow slideBack = HSLFTestDataSamples.writeOutAndReadBack(slideShow);
|
||||
assertNotNull(slideBack);
|
||||
assertEquals(29, slideBack.getSlides().length);
|
||||
} finally {
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue