You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2008/09/21 21:31:34 UTC
svn commit: r697595 -
/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java
Author: nick
Date: Sun Sep 21 12:31:34 2008
New Revision: 697595
URL: http://svn.apache.org/viewvc?rev=697595&view=rev
Log:
Improved tests to show that bugs #45062 and #44292 are fixed
Modified:
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java?rev=697595&r1=697594&r2=697595&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java Sun Sep 21 12:31:34 2008
@@ -74,7 +74,8 @@
}
/**
- * Test for TableCell not skipping the last paragraph
+ * Test for TableCell not skipping the last paragraph.
+ * Bugs #45062 and #44292
*/
public void testTableCellLastParagraph() throws Exception {
HWPFDocument doc = new HWPFDocument(new FileInputStream(
@@ -93,22 +94,27 @@
Table t = r.getTable(p);
//get the only row
+ assertEquals(1, t.numRows());
TableRow row = t.getRow(0);
//get the first cell
TableCell cell = row.getCell(0);
// First cell should have one paragraph
assertEquals(1, cell.numParagraphs());
+ assertEquals("One paragraph is ok\7", cell.getParagraph(0).text());
//get the second
cell = row.getCell(1);
// Second cell should be detected as having two paragraphs
assertEquals(2, cell.numParagraphs());
+ assertEquals("First para is ok\r", cell.getParagraph(0).text());
+ assertEquals("Second paragraph is skipped\7", cell.getParagraph(1).text());
//get the last cell
cell = row.getCell(2);
// Last cell should have one paragraph
assertEquals(1, cell.numParagraphs());
+ assertEquals("One paragraph is ok\7", cell.getParagraph(0).text());
}
public void testRangeDelete() throws Exception {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org