aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-11-19 18:13:04 +0000
committerMichael Williamson <mike@zwobble.org>2016-11-19 18:13:04 +0000
commit29be3ac8baadeb10ee827147b67a798348be6b9b (patch)
treec376a50c03277a5af5ca62ca6c22e6086b1cb7e6 /test
parenta55dee628eafdfd11c82cda0682ceebb3adbbfc1 (diff)
Set font on runs
Diffstat (limited to 'test')
-rw-r--r--test/docx/body-reader.tests.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js
index 01b6503..2b96ded 100644
--- a/test/docx/body-reader.tests.js
+++ b/test/docx/body-reader.tests.js
@@ -281,6 +281,14 @@ test("run has vertical alignment read from properties", function() {
assert.deepEqual(run.verticalAlignment, documents.verticalAlignment.superscript);
});
+test("run has font read from properties", function() {
+ var fontXml = new XmlElement("w:rFonts", {"w:ascii": "Arial"});
+ var runXml = runWithProperties([fontXml]);
+
+ var run = readXmlElementValue(runXml);
+ assert.deepEqual(run.font, "Arial");
+});
+
test("run properties not included as child of run", function() {
var runStyleXml = new XmlElement("w:rStyle");
var runPropertiesXml = new XmlElement("w:rPr", {}, [runStyleXml]);