aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Tests/Readers/Docx.hs4
-rw-r--r--test/docx/overlapping_targets.docxbin0 -> 13747 bytes
-rw-r--r--test/docx/overlapping_targets.native3
3 files changed, 7 insertions, 0 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index 19aecd9ec..d79b8a063 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -179,6 +179,10 @@ tests = [ testGroup "inlines"
"remove anchor spans with nothing pointing to them"
"docx/unused_anchors.docx"
"docx/unused_anchors.native"
+ , testCompare
+ "collapse overlapping targets (anchor spans)"
+ "docx/overlapping_targets.docx"
+ "docx/overlapping_targets.native"
]
, testGroup "blocks"
[ testCompare
diff --git a/test/docx/overlapping_targets.docx b/test/docx/overlapping_targets.docx
new file mode 100644
index 000000000..45ae7cd58
--- /dev/null
+++ b/test/docx/overlapping_targets.docx
Binary files differ
diff --git a/test/docx/overlapping_targets.native b/test/docx/overlapping_targets.native
new file mode 100644
index 000000000..17dcafd96
--- /dev/null
+++ b/test/docx/overlapping_targets.native
@@ -0,0 +1,3 @@
+[Para [Link ("",[],[]) [Str "One",Space,Str "link",Space,Str "to",Space,Str "one",Space,Str "target."] ("#Fizz","")]
+,Para [Span ("Fizz",["anchor"],[]) [],Str "This",Space,Str "is",Space,Str "a",Space,Str "target",Space,Str "with",Space,Str "two",Space,Str "names."]
+,Para [Link ("",[],[]) [Str "Another",Space,Str "link",Space,Str "to",Space,Str "the",Space,Str "same",Space,Str "target."] ("#Fizz","")]]