aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-01-16 13:20:01 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-01-16 13:22:02 -0500
commit004f60bf265f7e76ca59ea49ae1070e8d09d1ce7 (patch)
tree5be1f006b327cd6ad5c4685e63c4e9606dd028e0 /test
parent95d602d3b7df8946f236aaad310bedf8fdc2e09f (diff)
downloadpandoc-004f60bf265f7e76ca59ea49ae1070e8d09d1ce7.tar.gz
Docx reader: Add test for hyperlinks in instrText tag
This is difficult to recreate with a modern version of Word, so I'm using the file submitted with the bug report. It would be preferable to find a smaller example with Latin characters, though, so as not to confuse the issue being tested.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Docx.hs4
-rw-r--r--test/docx/instrText_hyperlink.docxbin0 -> 13628 bytes
-rw-r--r--test/docx/instrText_hyperlink.native1
3 files changed, 5 insertions, 0 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index 68c2e3476..d58e219de 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -128,6 +128,10 @@ tests = [ testGroup "inlines"
"docx/links.docx"
"docx/links.native"
, testCompare
+ "hyperlinks in <w:instrText> tag"
+ "docx/instrText_hyperlink.docx"
+ "docx/instrText_hyperlink.native"
+ , testCompare
"inline image"
"docx/image.docx"
"docx/image_no_embed.native"
diff --git a/test/docx/instrText_hyperlink.docx b/test/docx/instrText_hyperlink.docx
new file mode 100644
index 000000000..9f24b3896
--- /dev/null
+++ b/test/docx/instrText_hyperlink.docx
Binary files differ
diff --git a/test/docx/instrText_hyperlink.native b/test/docx/instrText_hyperlink.native
new file mode 100644
index 000000000..4293c48db
--- /dev/null
+++ b/test/docx/instrText_hyperlink.native
@@ -0,0 +1 @@
+[Para [Str "\24076\26395\28145\20837\20102\35299\30340\35835\32773\21487\20197\21435\30475David",Space,Str "French",Space,Str "Belding\21644Kevin",Space,Str "J.",Space,Str "Mitchell\30340",Link ("",[],[]) [Str "Foundations",Space,Str "of",Space,Str "Analysis,",Space,Str "2nd",Space,Str "Edition"] ("https://books.google.com/books?id=sp_Zcb9ot90C&lpg=PR4&hl=zh-CN&pg=PA19#v=onepage&q&f=true",""),Str ",\21487\20174\&19\39029\30475\36215\65292\25110D.C.",Space,Str "Goldrei\30340",Space,Link ("",[],[]) [Str "Classic",Space,Str "Set",Space,Str "Theory:",Space,Str "For",Space,Str "Guided",Space,Str "Independent",Space,Str "Study"] ("https://books.google.ae/books?id=dlc0DwAAQBAJ&lpg=PT29&hl=zh-CN&pg=PT26#v=onepage&q&f=true",""),Str "\65292\20174\31532\20108\31456\30475\36215\65292\38405\35835\26102\35201\27880\24847\26412\25991\19982\36825\20123\20070\25152\19981\21516\30340\26159\24182\27809\26377\25226\23454\25968\30475\20316\26159\26377\29702\25968\38598\30340\20998\21106\12290"]]