aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-05-10 21:29:20 +0100
committerMichael Williamson <mike@zwobble.org>2016-05-10 21:29:20 +0100
commit786ed7e34f5d6fe8adf80f7f5bae7abc6a037740 (patch)
tree7d90a6fb2753aed42f2c63510306b67366bdb730 /tests
parent1417c93bebe0426be97d8f334fc279a6eb10deda (diff)
Avoid merging in non-conforming cells
Diffstat (limited to 'tests')
-rw-r--r--tests/docx/body-reader.tests.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/docx/body-reader.tests.js b/tests/docx/body-reader.tests.js
index 51d46fe..10554ed 100644
--- a/tests/docx/body-reader.tests.js
+++ b/tests/docx/body-reader.tests.js
@@ -328,6 +328,18 @@ describe("readXmlElement: ", function() {
]));
});
+ test("no merging if merged cells do not line up", function() {
+ var tableXml = new XmlElement("w:tbl", {}, [
+ row(emptyCell(gridSpan("2"), vMerge("restart"))),
+ row(emptyCell(), emptyCell(vMerge("continue")))
+ ]);
+ var result = readXmlElement(tableXml);
+ assert.deepEqual(result.value, new documents.Table([
+ docRow([docEmptyCell({colSpan: 2})]),
+ docRow([docEmptyCell(), docEmptyCell()]),
+ ]));
+ });
+
test("warning if non-row in table", function() {
var tableXml = new XmlElement("w:tbl", {}, [
new XmlElement("w:p")