diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2017-12-30 22:43:33 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2017-12-30 22:43:33 -0500 |
commit | 475b0dcb66c2a7cdc78022b4dcb7c7fbb17ab309 (patch) | |
tree | 47406913e8bcc53aea9bc2639601a35a70d93fef | |
parent | e90c714c73be58ef09b08272c676f96e2a21c767 (diff) | |
download | pandoc-475b0dcb66c2a7cdc78022b4dcb7c7fbb17ab309.tar.gz |
Docx reader: tests for removing unused anchors.
-rw-r--r-- | test/Tests/Readers/Docx.hs | 4 | ||||
-rw-r--r-- | test/docx/unused_anchors.docx | bin | 0 -> 13276 bytes | |||
-rw-r--r-- | test/docx/unused_anchors.native | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs index 5710a388f..19aecd9ec 100644 --- a/test/Tests/Readers/Docx.hs +++ b/test/Tests/Readers/Docx.hs @@ -175,6 +175,10 @@ tests = [ testGroup "inlines" "inlines inside of Structured Document Tags" "docx/sdt_elements.docx" "docx/sdt_elements.native" + , testCompare + "remove anchor spans with nothing pointing to them" + "docx/unused_anchors.docx" + "docx/unused_anchors.native" ] , testGroup "blocks" [ testCompare diff --git a/test/docx/unused_anchors.docx b/test/docx/unused_anchors.docx Binary files differnew file mode 100644 index 000000000..416488bbf --- /dev/null +++ b/test/docx/unused_anchors.docx diff --git a/test/docx/unused_anchors.native b/test/docx/unused_anchors.native new file mode 100644 index 000000000..334269793 --- /dev/null +++ b/test/docx/unused_anchors.native @@ -0,0 +1,3 @@ +[Header 1 ("my-section",[],[]) [Str "My",Space,Str "Section"] +,Para [Link ("",[],[]) [Str "Here",Space,Str "is",Space,Str "a",Space,Str "link."] ("#Bar","")] +,Para [Span ("Bar",["anchor"],[]) [],Str "Here",Space,Str "is",Space,Str "the",Space,Str "target."]] |