diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TextExtractor.java b/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TextExtractor.java index a8294a11d..8ab7fe5bb 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TextExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TextExtractor.java @@ -28,40 +28,56 @@ import junit.framework.TestCase; * @author Nick Burch (nick at torchbox dot com) */ public class TextExtractor extends TestCase { - // Extractor primed on the test data + // Extractor primed on the 2 page basic test data private PowerPointExtractor ppe; + // Extractor primed on the 1 page but text-box'd test data + private PowerPointExtractor ppe2; public TextExtractor() throws Exception { String dirname = System.getProperty("HSLF.testdata.path"); String filename = dirname + "/basic_test_ppt_file.ppt"; ppe = new PowerPointExtractor(filename); + String filename2 = dirname + "/with_textbox.ppt"; + ppe2 = new PowerPointExtractor(filename2); } public void testReadSheetText() throws Exception { + // Basic 2 page example String sheetText = ppe.getText(); String expectText = "This is a test title\nThis is a test subtitle\nThis is on page 1\nThis is the title on page 2\nThis is page two\nIt has several blocks of text\nNone of them have formatting\n"; - assertEquals(expectText.length(),sheetText.length()); - char[] st = sheetText.toCharArray(); - char[] et = expectText.toCharArray(); - for(int i=0; i