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:
Dominik Stadler 2014-07-27 19:57:57 +00:00
parent 15476cd981
commit 70695de82e
2 changed files with 18 additions and 1 deletions

View File

@ -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.