diff options
| author | Michael Williamson <mike@zwobble.org> | 2017-02-16 11:25:29 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2017-02-16 11:25:29 +0000 |
| commit | 0504e5eeea18906d69ecdb3f832fd928f749f026 (patch) | |
| tree | 8d1fd78674f646036c1c826a59637cdead5d8dd7 /test | |
| parent | 56020bc35f1e7f93989a5b38686cee515ba31b36 (diff) | |
Separate test for runs after complex fields
Diffstat (limited to 'test')
| -rw-r--r-- | test/docx/body-reader.tests.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index 0aad67a..588d26a 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -173,8 +173,7 @@ test("complex fields", (function() { beginXml, hyperlinkInstrText, hyperlinkRunXml, - endXml, - afterEndXml + endXml ]); var paragraph = readXmlElementValue(parXml); @@ -190,9 +189,24 @@ test("complex fields", (function() { }) ) }), + isEmptyRun + )); + }, + + "runs after a complex field for hyperlinks are not read as hyperlinks": function() { + var afterEndXml = runOfText("this will not be a hyperlink"); + var parXml = new XmlElement("w:p", {}, [ + beginXml, + hyperlinkInstrText, + endXml, + afterEndXml + ]); + var paragraph = readXmlElementValue(parXml); + + assertThat(paragraph.children, contains( + isEmptyRun, isEmptyRun, isRun({ - // runs after fldCharType "end" do not become hyperlinks children: contains( isText("this will not be a hyperlink") ) |
