diff options
author | Nick Burch <nick@apache.org> | 2008-08-09 14:50:16 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2008-08-09 14:50:16 +0000 |
commit | 910d9e66f71cadf335c885f51320382ee04200a8 (patch) | |
tree | e6d784dde7fd40193120e823a38694093c47cacc /src/ooxml/testcases/org/apache | |
parent | 13467b4732b2a5ba081f8c0ad08751485b4b39e2 (diff) | |
download | poi-910d9e66f71cadf335c885f51320382ee04200a8.tar.gz poi-910d9e66f71cadf335c885f51320382ee04200a8.zip |
Improve paragraph text stuff, and further header tests
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@684273 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/testcases/org/apache')
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java | 4 | ||||
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java b/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java index b61af2f06c..1b26bb58ac 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java @@ -111,7 +111,7 @@ public class TestXWPFWordExtractor extends TestCase { assertTrue(text.length() > 0); char euro = '\u20ac'; -// System.err.println("'"+text.substring(text.length() - 20) + "'"); +// System.err.println("'"+text.substring(text.length() - 40) + "'"); // Check contents assertTrue(text.startsWith( @@ -121,7 +121,7 @@ public class TestXWPFWordExtractor extends TestCase { "As well as gaining "+euro+"90 from child benefit increases, he will also receive the early childhood supplement of "+euro+"250 per quarter for Vincent for the full four quarters of the year.\n\n\n\n \n\n\n" )); assertTrue(text.endsWith( - "11.4%\t\t90\t\t\t\t\t250\t\t1,310\t\t\n\n" + "11.4%\t\t90\t\t\t\t\t250\t\t1,310\t\n\n" )); // Check number of paragraphs diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java index b1f6971652..b2269c2908 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java @@ -165,7 +165,7 @@ public class TestXWPFHeaderFooterPolicy extends TestCase { public void testContents() throws Exception { XWPFHeaderFooterPolicy policy; - // Just test a few bits + // Test a few simple bits off a simple header policy = diffFirst.getHeaderFooterPolicy(); assertEquals( @@ -176,5 +176,18 @@ public class TestXWPFHeaderFooterPolicy extends TestCase { "First header column!\tMid header\tRight header!\n", policy.getDefaultHeader().getText() ); + + + // And a few bits off a more complex header + policy = oddEven.getHeaderFooterPolicy(); + + assertEquals( + "\n[]ODD Page Header text\n\n", + policy.getDefaultHeader().getText() + ); + assertEquals( + "\n[This is an Even Page, with a Header]\n\n", + policy.getEvenPageHeader().getText() + ); } } |