summaryrefslogtreecommitdiff
path: root/test/docx
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-02-04 12:56:30 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-02-04 12:56:30 +0100
commit18ab8642692caca2716fd9b5a0e6dbfd3d9cf9cc (patch)
tree05f4e9024093e233c131b3494e71265062ffd94a /test/docx
parent8418c1a7d7e5312dfddbc011adb257552b2a864b (diff)
Moved tests/ -> test/.
Diffstat (limited to 'test/docx')
-rw-r--r--test/docx/adjacent_links.docxbin0 -> 8538 bytes
-rw-r--r--test/docx/adjacent_links.native1
-rw-r--r--test/docx/already_auto_ident.docxbin0 -> 8463 bytes
-rw-r--r--test/docx/already_auto_ident.native2
-rw-r--r--test/docx/block_quotes.docxbin0 -> 41855 bytes
-rw-r--r--test/docx/block_quotes_parse_indent.native8
-rw-r--r--test/docx/char_styles.docxbin0 -> 30134 bytes
-rw-r--r--test/docx/char_styles.native4
-rw-r--r--test/docx/codeblock.docxbin0 -> 8465 bytes
-rw-r--r--test/docx/codeblock.native3
-rw-r--r--test/docx/comments.docxbin0 -> 17109 bytes
-rw-r--r--test/docx/comments.native4
-rw-r--r--test/docx/comments_no_comments.native4
-rw-r--r--test/docx/comments_warning.docxbin0 -> 17078 bytes
-rw-r--r--test/docx/custom-style-reference.docxbin0 -> 14846 bytes
-rw-r--r--test/docx/custom-style-roundtrip-end.native5
-rw-r--r--test/docx/custom-style-roundtrip-start.native5
-rw-r--r--test/docx/deep_normalize.docxbin0 -> 29246 bytes
-rw-r--r--test/docx/deep_normalize.native6
-rw-r--r--test/docx/definition_list.docxbin0 -> 8455 bytes
-rw-r--r--test/docx/definition_list.native7
-rw-r--r--test/docx/drop_cap.docxbin0 -> 26931 bytes
-rw-r--r--test/docx/drop_cap.native4
-rw-r--r--test/docx/dummy_item_after_list_item.docxbin0 -> 70197 bytes
-rw-r--r--test/docx/dummy_item_after_list_item.native3
-rw-r--r--test/docx/dummy_item_after_paragraph.docxbin0 -> 70234 bytes
-rw-r--r--test/docx/dummy_item_after_paragraph.native3
-rw-r--r--test/docx/enumerated_headings.docxbin0 -> 12539 bytes
-rw-r--r--test/docx/enumerated_headings.native4
-rw-r--r--test/docx/german_styled_lists.docxbin0 -> 43957 bytes
-rw-r--r--test/docx/german_styled_lists.native6
-rw-r--r--test/docx/hanging_indent.docxbin0 -> 29924 bytes
-rw-r--r--test/docx/hanging_indent.native3
-rw-r--r--test/docx/headers.docxbin0 -> 29659 bytes
-rw-r--r--test/docx/headers.native13
-rw-r--r--test/docx/i18n_blocks.docxbin0 -> 13680 bytes
-rw-r--r--test/docx/i18n_blocks.native8
-rw-r--r--test/docx/image.docxbin0 -> 35407 bytes
-rw-r--r--test/docx/image_no_embed.native2
-rw-r--r--test/docx/image_no_embed_writer.native2
-rw-r--r--test/docx/image_vml.docxbin0 -> 23559 bytes
-rw-r--r--test/docx/image_vml.native4
-rw-r--r--test/docx/inline_code.docxbin0 -> 8379 bytes
-rw-r--r--test/docx/inline_code.native1
-rw-r--r--test/docx/inline_formatting.docxbin0 -> 32322 bytes
-rw-r--r--test/docx/inline_formatting.native5
-rw-r--r--test/docx/inline_formatting_writer.native5
-rw-r--r--test/docx/inline_images.docxbin0 -> 15875 bytes
-rw-r--r--test/docx/inline_images.native2
-rw-r--r--test/docx/inline_images_writer.native2
-rw-r--r--test/docx/link_in_notes.docxbin0 -> 27357 bytes
-rw-r--r--test/docx/link_in_notes.native1
-rw-r--r--test/docx/links.docxbin0 -> 45115 bytes
-rw-r--r--test/docx/links.native7
-rw-r--r--test/docx/links_writer.native6
-rw-r--r--test/docx/lists.docxbin0 -> 31775 bytes
-rw-r--r--test/docx/lists.native18
-rw-r--r--test/docx/lists_writer.native17
-rw-r--r--test/docx/metadata.docxbin0 -> 39538 bytes
-rw-r--r--test/docx/metadata.native2
-rw-r--r--test/docx/metadata_after_normal.docxbin0 -> 56276 bytes
-rw-r--r--test/docx/metadata_after_normal.native7
-rw-r--r--test/docx/nested_anchors_in_header.docxbin0 -> 17535 bytes
-rw-r--r--test/docx/nested_anchors_in_header.native10
-rw-r--r--test/docx/normalize.docxbin0 -> 25791 bytes
-rw-r--r--test/docx/normalize.native2
-rw-r--r--test/docx/notes.docxbin0 -> 30734 bytes
-rw-r--r--test/docx/notes.native2
-rw-r--r--test/docx/numbered_header.docxbin0 -> 26129 bytes
-rw-r--r--test/docx/numbered_header.native1
-rw-r--r--test/docx/special_punctuation.docxbin0 -> 8408 bytes
-rw-r--r--test/docx/special_punctuation.native2
-rw-r--r--test/docx/table_one_row.docxbin0 -> 25251 bytes
-rw-r--r--test/docx/table_one_row.native7
-rw-r--r--test/docx/table_with_list_cell.docxbin0 -> 32615 bytes
-rw-r--r--test/docx/table_with_list_cell.native11
-rw-r--r--test/docx/tables.docxbin0 -> 49780 bytes
-rw-r--r--test/docx/tables.native36
-rw-r--r--test/docx/tabs.docxbin0 -> 12919 bytes
-rw-r--r--test/docx/tabs.native2
-rw-r--r--test/docx/track_changes_deletion.docxbin0 -> 13350 bytes
-rw-r--r--test/docx/track_changes_deletion_accept.native1
-rw-r--r--test/docx/track_changes_deletion_all.native1
-rw-r--r--test/docx/track_changes_deletion_reject.native1
-rw-r--r--test/docx/track_changes_insertion.docxbin0 -> 12956 bytes
-rw-r--r--test/docx/track_changes_insertion_accept.native1
-rw-r--r--test/docx/track_changes_insertion_all.native1
-rw-r--r--test/docx/track_changes_insertion_reject.native1
-rw-r--r--test/docx/track_changes_move.docxbin0 -> 26151 bytes
-rw-r--r--test/docx/track_changes_move_accept.native3
-rw-r--r--test/docx/track_changes_move_all.native4
-rw-r--r--test/docx/track_changes_move_reject.native3
-rw-r--r--test/docx/trailing_spaces_in_formatting.docxbin0 -> 12916 bytes
-rw-r--r--test/docx/trailing_spaces_in_formatting.native1
-rw-r--r--test/docx/unicode.docxbin0 -> 11506 bytes
-rw-r--r--test/docx/unicode.native1
-rw-r--r--test/docx/verbatim_subsuper.docxbin0 -> 10353 bytes
-rw-r--r--test/docx/verbatim_subsuper.native8
98 files changed, 273 insertions, 0 deletions
diff --git a/test/docx/adjacent_links.docx b/test/docx/adjacent_links.docx
new file mode 100644
index 000000000..86b1c2a14
--- /dev/null
+++ b/test/docx/adjacent_links.docx
Binary files differ
diff --git a/test/docx/adjacent_links.native b/test/docx/adjacent_links.native
new file mode 100644
index 000000000..cca861890
--- /dev/null
+++ b/test/docx/adjacent_links.native
@@ -0,0 +1 @@
+[Para [Str "Le",Space,Str "plus",Space,Str "int\233ressant",Space,Str "\233tant",Space,Str "sans",Space,Str "doute",Space,Str "le",Space,Str "Marsan,",Space,Str "propos\233",Space,Str "par",Space,Str "Claude",Space,Str "Marsan",Space,Str "en",Space,Str "1976",Space,Str "qui",Space,Str "avait",Space,Str "m\234me",Space,Str "fait",Space,Str "l'objet",Space,Str "d'une",Space,Str "norme,",Space,Str "mais",Space,Str "qui",Space,Str "n'a",Space,Str "pas",Space,Str "du",Space,Str "tout",Space,Str "\233t\233",Space,Str "adopt\233",Space,Str "\224",Space,Str "cause",Space,Str "des",Space,Str "habitudes",Space,Str "trop",Space,Str "ancr\233es",Space,Str "et",Space,Str "qui",Space,Str "a",Space,Str "fini",Space,Str "par",Space,Str "tomber",Space,Str "dans",Space,Str "l'oubli,",Space,Str "gros",Space,Str "clin",Space,Str "d'\339il",Space,Str "\224",Space,Str "cela",Space,Str "d'ailleurs",Space,Str "dans",Space,Str "le",Space,Str "film",Space,Link ("",[],[]) [Emph [Str "\"Le",Space,Str "nom",Space,Str "des",Space,Str "gens\""]] ("http://www.allocine.fr/film/fichefilm_gen_cfilm=172167.html",""),Str ".",Space,Str "D\8217ailleurs",Space,Str "l\8217\233tat,",Space,Str "bien",Space,Str "conscient",Space,Str "que",Space,Str "tous",Space,Str "les",Space,Str "fran\231ais",Space,Str "\233crivent",Space,Str "sur",Space,Str "des",Space,Str "claviers",Space,Str "compl\232tement",Space,Str "inadapt\233s,",Space,Link ("",[],[]) [Emph [Str "tente",Space,Str "encore",Space,Str "une",Space,Str "fois",Space,Str "de",Space,Str "faire",Space,Str "une",Space,Str "norme",Space,Str "en",Space,Str "ce",Space,Str "moment",Space,Str "m\234me"]] ("http://www.appy-geek.com/Web/ArticleWeb.aspx?regionid=2&articleid=56103389&source=messenger",""),Str "."]]
diff --git a/test/docx/already_auto_ident.docx b/test/docx/already_auto_ident.docx
new file mode 100644
index 000000000..ec2b348d7
--- /dev/null
+++ b/test/docx/already_auto_ident.docx
Binary files differ
diff --git a/test/docx/already_auto_ident.native b/test/docx/already_auto_ident.native
new file mode 100644
index 000000000..67c37298d
--- /dev/null
+++ b/test/docx/already_auto_ident.native
@@ -0,0 +1,2 @@
+[Header 1 ("anchor-header",[],[]) [Str "Anchor",Space,Str "Header"]
+,Para [Str "A",Space,Link ("",[],[]) [Str "link"] ("#anchor-header","")]]
diff --git a/test/docx/block_quotes.docx b/test/docx/block_quotes.docx
new file mode 100644
index 000000000..729ae1f43
--- /dev/null
+++ b/test/docx/block_quotes.docx
Binary files differ
diff --git a/test/docx/block_quotes_parse_indent.native b/test/docx/block_quotes_parse_indent.native
new file mode 100644
index 000000000..842b3606a
--- /dev/null
+++ b/test/docx/block_quotes_parse_indent.native
@@ -0,0 +1,8 @@
+[Header 2 ("some-block-quotes-in-different-ways",[],[]) [Str "Some",Space,Str "block",Space,Str "quotes,",Space,Str "in",Space,Str "different",Space,Str "ways"]
+,Para [Str "This",Space,Str "is",Space,Str "the",Space,Str "proper",Space,Str "way,",Space,Str "with",Space,Str "a",Space,Str "style"]
+,BlockQuote
+ [Para [Str "I",Space,Str "don\8217t",Space,Str "know",Space,Str "why",Space,Str "this",Space,Str "would",Space,Str "be",Space,Str "in",Space,Str "italics,",Space,Str "but",Space,Str "so",Space,Str "it",Space,Str "appears",Space,Str "to",Space,Str "be",Space,Str "on",Space,Str "my",Space,Str "screen."]]
+,Para [Str "And",Space,Str "this",Space,Str "is",Space,Str "the",Space,Str "way",Space,Str "that",Space,Str "most",Space,Str "people",Space,Str "do",Space,Str "it:"]
+,BlockQuote
+ [Para [Str "I",Space,Str "just",Space,Str "indented",Space,Str "this,",Space,Str "so",Space,Str "it",Space,Str "looks",Space,Str "like",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "I",Space,Str "think",Space,Str "this",Space,Str "is",Space,Str "how",Space,Str "most",Space,Str "people",Space,Str "do",Space,Str "block",Space,Str "quotes",Space,Str "in",Space,Str "their",Space,Str "documents."]]
+,Para [Str "And",Space,Str "back",Space,Str "to",Space,Str "the",Space,Str "normal",Space,Str "style."]]
diff --git a/test/docx/char_styles.docx b/test/docx/char_styles.docx
new file mode 100644
index 000000000..05979b9a7
--- /dev/null
+++ b/test/docx/char_styles.docx
Binary files differ
diff --git a/test/docx/char_styles.native b/test/docx/char_styles.native
new file mode 100644
index 000000000..7dfc208fb
--- /dev/null
+++ b/test/docx/char_styles.native
@@ -0,0 +1,4 @@
+[Para [Emph [Str "This",Space,Str "is",Space,Str "all",Space,Str "in",Space,Str "an"],Space,Emph [Strong [Str "italic",Space,Str "style"],Str "."]]
+,Para [Emph [Str "This",Space,Str "is",Space,Str "an",Space,Str "italic"],Space,Str "style",Space,Emph [Str "with",Space,Str "some"],Space,Str "words",Space,Emph [Str "unitalicized."]]
+,Para [Strong [Str "This",Space,Str "is",Space,Str "all",Space,Str "in",Space,Str "a",Space,Emph [Str "strong",Space,Str "style"],Str "."]]
+,Para [Strong [Str "This",Space,Str "is",Space,Str "a",Space,Str "strong"],Space,Str "style",Space,Strong [Str "with",Space,Str "some"],Space,Str "words",Space,Strong [Str "ubolded."]]]
diff --git a/test/docx/codeblock.docx b/test/docx/codeblock.docx
new file mode 100644
index 000000000..8ec00953c
--- /dev/null
+++ b/test/docx/codeblock.docx
Binary files differ
diff --git a/test/docx/codeblock.native b/test/docx/codeblock.native
new file mode 100644
index 000000000..441e33511
--- /dev/null
+++ b/test/docx/codeblock.native
@@ -0,0 +1,3 @@
+[Para [Str "This",Space,Str "is",Space,Str "some",Space,Str "code:"]
+,CodeBlock ("",[],[]) "readDocx :: ReaderOptions\n -> B.ByteString\n -> Pandoc"
+,Para [Str "from",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "the",Space,Str "docx",Space,Str "reader."]]
diff --git a/test/docx/comments.docx b/test/docx/comments.docx
new file mode 100644
index 000000000..9df74cf0a
--- /dev/null
+++ b/test/docx/comments.docx
Binary files differ
diff --git a/test/docx/comments.native b/test/docx/comments.native
new file mode 100644
index 000000000..3357bc257
--- /dev/null
+++ b/test/docx/comments.native
@@ -0,0 +1,4 @@
+[Para [Str "I",Space,Str "want",Space,Span ("",["comment-start"],[("id","0"),("author","Jesse Rosenthal"),("date","2016-05-09T16:13:00Z")]) [Str "I",Space,Str "left",Space,Str "a",Space,Str "comment."],Str "some",Space,Str "text",Space,Str "to",Space,Str "have",Space,Str "a",Space,Str "comment",Space,Span ("",["comment-end"],[("id","0")]) [],Str "on",Space,Str "it."]
+,Para [Str "This",Space,Str "is",Space,Span ("",["comment-start"],[("id","1"),("author","Jesse Rosenthal"),("date","2016-05-09T16:13:00Z")]) [Str "A",Space,Str "comment",Space,Str "across",Space,Str "paragraphs."],Str "a",Space,Str "new",Space,Str "paragraph."]
+,Para [Str "And",Space,Str "so",Span ("",["comment-end"],[("id","1")]) [],Space,Str "is",Space,Str "this."]
+,Para [Str "One",Space,Span ("",["comment-start"],[("id","2"),("author","Jesse Rosenthal"),("date","2016-05-09T16:14:00Z")]) [Str "This",Space,Str "one",Space,Str "has",Space,Str "multiple",Space,Str "paragraphs.",Space,Str "\182",Space,Str "See?"],Str "more",Span ("",["comment-end"],[("id","2")]) [],Str ".",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "one",Space,Str "with",Space,Str "a",Space,Span ("",["comment-start"],[("id","3"),("author","Jesse Rosenthal"),("date","2016-06-22T14:35:00Z")]) [Str "Do",Space,Str "something."],Span ("",["comment-start"],[("id","4"),("author","Jesse Rosenthal"),("date","2016-06-22T14:36:00Z")]) [Str "Do",Space,Str "something",Space,Str "else."],Str "comment",Space,Str "in",Space,Str "a",Space,Str "comment",Span ("",["comment-end"],[("id","3")]) [Span ("",["comment-end"],[("id","4")]) []],Str "."]]
diff --git a/test/docx/comments_no_comments.native b/test/docx/comments_no_comments.native
new file mode 100644
index 000000000..805e9b562
--- /dev/null
+++ b/test/docx/comments_no_comments.native
@@ -0,0 +1,4 @@
+[Para [Str "I",Space,Str "want",Space,Str "some",Space,Str "text",Space,Str "to",Space,Str "have",Space,Str "a",Space,Str "comment",Space,Str "on",Space,Str "it."]
+,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "new",Space,Str "paragraph."]
+,Para [Str "And",Space,Str "so",Space,Str "is",Space,Str "this."]
+,Para [Str "One",Space,Str "more.",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "comment",Space,Str "in",Space,Str "a",Space,Str "comment."]]
diff --git a/test/docx/comments_warning.docx b/test/docx/comments_warning.docx
new file mode 100644
index 000000000..e49642b22
--- /dev/null
+++ b/test/docx/comments_warning.docx
Binary files differ
diff --git a/test/docx/custom-style-reference.docx b/test/docx/custom-style-reference.docx
new file mode 100644
index 000000000..0f53c6c88
--- /dev/null
+++ b/test/docx/custom-style-reference.docx
Binary files differ
diff --git a/test/docx/custom-style-roundtrip-end.native b/test/docx/custom-style-roundtrip-end.native
new file mode 100644
index 000000000..4313c3595
--- /dev/null
+++ b/test/docx/custom-style-roundtrip-end.native
@@ -0,0 +1,5 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "custom-styles."]
+,Para [Str "Here",Space,Str "is",Space,Str "something",Space,Emph [Str "emphasized"],Str ".",Space,Str "And",Space,Str "here",Space,Str "is",Space,Str "something",Space,Strong [Str "strong"],Str "."]
+,BlockQuote
+ [Para [Str "One",Space,Str "paragraph",Space,Str "of",Space,Str "text."]
+ ,Para [Str "And",Space,Str "another",Space,Str "paragraph",Space,Str "of",Space,Emph [Str "really",Space,Str "cool"],Space,Str "text."]]]
diff --git a/test/docx/custom-style-roundtrip-start.native b/test/docx/custom-style-roundtrip-start.native
new file mode 100644
index 000000000..c4566ed85
--- /dev/null
+++ b/test/docx/custom-style-roundtrip-start.native
@@ -0,0 +1,5 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "custom-styles."]
+,Para [Str "Here",Space,Str "is",Space,Str "something",Space,Span ("",[],[("custom-style","Emphatic")]) [Str "emphasized"],Str ".",Space,Str "And",SoftBreak,Str "here",Space,Str "is",Space,Str "something",Space,Span ("",[],[("custom-style","Strengthened")]) [Str "strong"],Str "."]
+,Div ("",[],[("custom-style","My Block Style")])
+ [Para [Str "One",Space,Str "paragraph",Space,Str "of",Space,Str "text."]
+ ,Para [Str "And",Space,Str "another",Space,Str "paragraph",Space,Str "of",Space,Span ("",[],[("custom-style","Emphatic")]) [Str "really",SoftBreak,Str "cool"],Space,Str "text."]]]
diff --git a/test/docx/deep_normalize.docx b/test/docx/deep_normalize.docx
new file mode 100644
index 000000000..7626d59ce
--- /dev/null
+++ b/test/docx/deep_normalize.docx
Binary files differ
diff --git a/test/docx/deep_normalize.native b/test/docx/deep_normalize.native
new file mode 100644
index 000000000..9b2089ec8
--- /dev/null
+++ b/test/docx/deep_normalize.native
@@ -0,0 +1,6 @@
+[OrderedList (1,Decimal,OneParen)
+ [[Para [Str "This",Space,Str "is",Space,Str "at",Space,Str "the",Space,Str "first",Space,Str "level"]
+ ,OrderedList (1,LowerAlpha,DefaultDelim)
+ [[Para [Str "This",Space,Str "is",Space,Str "at",Space,Str "the",Space,Str "second",Space,Str "level"]
+ ,OrderedList (1,LowerRoman,DefaultDelim)
+ [[Para [Str "This",Space,Str "is",Space,Emph [Str "at",Space,Strong [Str "the",Space,Str "third",Space,Str "level"],Str ",",Space,Str "and",Space,Str "I",Space,Str "want",Space,Str "to"],Space,Str "test",Space,Str "normalization",Space,Str "here."]]]]]]]]
diff --git a/test/docx/definition_list.docx b/test/docx/definition_list.docx
new file mode 100644
index 000000000..a19edda45
--- /dev/null
+++ b/test/docx/definition_list.docx
Binary files differ
diff --git a/test/docx/definition_list.native b/test/docx/definition_list.native
new file mode 100644
index 000000000..2e08ff1ac
--- /dev/null
+++ b/test/docx/definition_list.native
@@ -0,0 +1,7 @@
+[DefinitionList
+ [([Str "Term",Space,Str "1"],
+ [[Para [Str "Definition",Space,Str "1"]]])
+ ,([Str "Term",Space,Str "2",Space,Str "with",Space,Emph [Str "inline",Space,Str "markup"]],
+ [[Para [Str "Definition",Space,Str "2"]
+ ,CodeBlock ("",[],[]) "{ some code, part of Definition 2 }"
+ ,Para [Str "Third",Space,Str "paragraph",Space,Str "of",Space,Str "definition",Space,Str "2."]]])]]
diff --git a/test/docx/drop_cap.docx b/test/docx/drop_cap.docx
new file mode 100644
index 000000000..19fab4a52
--- /dev/null
+++ b/test/docx/drop_cap.docx
Binary files differ
diff --git a/test/docx/drop_cap.native b/test/docx/drop_cap.native
new file mode 100644
index 000000000..d361cfb0b
--- /dev/null
+++ b/test/docx/drop_cap.native
@@ -0,0 +1,4 @@
+[Para [Str "Drop",Space,Str "cap."]
+,Para [Str "Next",Space,Str "paragraph."]
+,Para [Str "Drop",Space,Str "cap",Space,Str "in",Space,Str "margin."]
+,Para [Str "Drop",Space,Str "cap",Space,Str "(not",Space,Str "really)."]]
diff --git a/test/docx/dummy_item_after_list_item.docx b/test/docx/dummy_item_after_list_item.docx
new file mode 100644
index 000000000..5e29b993c
--- /dev/null
+++ b/test/docx/dummy_item_after_list_item.docx
Binary files differ
diff --git a/test/docx/dummy_item_after_list_item.native b/test/docx/dummy_item_after_list_item.native
new file mode 100644
index 000000000..3f6231932
--- /dev/null
+++ b/test/docx/dummy_item_after_list_item.native
@@ -0,0 +1,3 @@
+[OrderedList (1,Decimal,Period)
+ [[Para [Str "One"]
+ ,Para [Str "Two",LineBreak,LineBreak,Str "Three"]]]]
diff --git a/test/docx/dummy_item_after_paragraph.docx b/test/docx/dummy_item_after_paragraph.docx
new file mode 100644
index 000000000..b0aee8843
--- /dev/null
+++ b/test/docx/dummy_item_after_paragraph.docx
Binary files differ
diff --git a/test/docx/dummy_item_after_paragraph.native b/test/docx/dummy_item_after_paragraph.native
new file mode 100644
index 000000000..2e9b831c4
--- /dev/null
+++ b/test/docx/dummy_item_after_paragraph.native
@@ -0,0 +1,3 @@
+[Para [Str "First",Space,Str "bullet",Space,Str "point",Space,Str "created",Space,Str "and",Space,Str "then",Space,Str "deleted"]
+,Para [Str "A",Space,Str "normal",Space,Str "paragraph"]
+,Para [Str "First",Space,Str "bullet",Space,Str "point",Space,Str "created",Space,Str "and",Space,Str "then",Space,Str "deleted",Space,Str "after",Space,Str "the",Space,Str "normal",Space,Str "paragraph"]]
diff --git a/test/docx/enumerated_headings.docx b/test/docx/enumerated_headings.docx
new file mode 100644
index 000000000..afa84748a
--- /dev/null
+++ b/test/docx/enumerated_headings.docx
Binary files differ
diff --git a/test/docx/enumerated_headings.native b/test/docx/enumerated_headings.native
new file mode 100644
index 000000000..67c0df5e0
--- /dev/null
+++ b/test/docx/enumerated_headings.native
@@ -0,0 +1,4 @@
+[Header 1 ("h1",[],[]) [Str "H1"]
+,Header 2 ("h2",[],[]) [Str "H2"]
+,Header 3 ("h3",[],[]) [Str "H3"]
+,Para [Str "And",Space,Str "some",Space,Str "text"]]
diff --git a/test/docx/german_styled_lists.docx b/test/docx/german_styled_lists.docx
new file mode 100644
index 000000000..ce454e9cc
--- /dev/null
+++ b/test/docx/german_styled_lists.docx
Binary files differ
diff --git a/test/docx/german_styled_lists.native b/test/docx/german_styled_lists.native
new file mode 100644
index 000000000..4d5456dfc
--- /dev/null
+++ b/test/docx/german_styled_lists.native
@@ -0,0 +1,6 @@
+[BulletList
+ [[Para [Str "One",Space,Str "level",Space,Str "of",Space,Str "the",Space,Str "list."]]
+ ,[Para [Str "Second",Space,Str "level",Space,Str "of",Space,Str "the",Space,Str "list."]
+ ,BulletList
+ [[Para [Str "Next",Space,Str "level",Space,Str "of",Space,Str "the",Space,Str "list"]]]]
+ ,[Para [Str "Back",Space,Str "to",Space,Str "the",Space,Str "top",Space,Str "level."]]]]
diff --git a/test/docx/hanging_indent.docx b/test/docx/hanging_indent.docx
new file mode 100644
index 000000000..6f62dc731
--- /dev/null
+++ b/test/docx/hanging_indent.docx
Binary files differ
diff --git a/test/docx/hanging_indent.native b/test/docx/hanging_indent.native
new file mode 100644
index 000000000..138a6967f
--- /dev/null
+++ b/test/docx/hanging_indent.native
@@ -0,0 +1,3 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "hanging",Space,Str "indent,",Space,Str "with",Space,Str "the",Space,Str "left",Space,Str "side",Space,Str "set",Space,Str "to",Space,Str "the",Space,Str "left",Space,Str "margin,",Space,Str "and",Space,Str "it",Space,Str "wraps",Space,Str "around",Space,Str "the",Space,Str "line."]
+,BlockQuote
+ [Para [Str "Five",Space,Str "years",Space,Str "have",Space,Str "passed,",Space,Str "five",Space,Str "summers",Space,Str "with",Space,Str "the",Space,Str "length"]]]
diff --git a/test/docx/headers.docx b/test/docx/headers.docx
new file mode 100644
index 000000000..e1fbbcc75
--- /dev/null
+++ b/test/docx/headers.docx
Binary files differ
diff --git a/test/docx/headers.native b/test/docx/headers.native
new file mode 100644
index 000000000..5d0065239
--- /dev/null
+++ b/test/docx/headers.native
@@ -0,0 +1,13 @@
+[Header 1 ("a-test-of-headers",[],[]) [Str "A",Space,Str "Test",Space,Str "of",Space,Str "Headers"]
+,Header 2 ("second-level",[],[]) [Str "Second",Space,Str "Level"]
+,Para [Str "Some",Space,Str "plain",Space,Str "text."]
+,Header 3 ("third-level",[],[]) [Str "Third",Space,Str "level"]
+,Para [Str "Some",Space,Str "more",Space,Str "plain",Space,Str "text."]
+,Header 4 ("fourth-level",[],[]) [Str "Fourth",Space,Str "level"]
+,Para [Str "Some",Space,Str "more",Space,Str "plain",Space,Str "text."]
+,Header 5 ("fifth-level",[],[]) [Str "Fifth",Space,Str "level"]
+,Para [Str "Some",Space,Str "more",Space,Str "plain",Space,Str "text."]
+,Header 6 ("sixth-level",[],[]) [Str "Sixth",Space,Str "level"]
+,Para [Str "Some",Space,Str "more",Space,Str "plain",Space,Str "text."]
+,Para [Str "Seventh",Space,Str "level"]
+,Para [Str "Since",Space,Str "no",Space,Str "Heading",Space,Str "7",Space,Str "style",Space,Str "exists",Space,Str "in",Space,Str "styles.xml,",Space,Str "this",Space,Str "gets",Space,Str "converted",Space,Str "to",Space,Str "Span."]]
diff --git a/test/docx/i18n_blocks.docx b/test/docx/i18n_blocks.docx
new file mode 100644
index 000000000..36341c363
--- /dev/null
+++ b/test/docx/i18n_blocks.docx
Binary files differ
diff --git a/test/docx/i18n_blocks.native b/test/docx/i18n_blocks.native
new file mode 100644
index 000000000..582a7360d
--- /dev/null
+++ b/test/docx/i18n_blocks.native
@@ -0,0 +1,8 @@
+[Header 1 ("this-is-heading-1",[],[]) [Str "This",Space,Str "is",Space,Str "Heading",Space,Str "1"]
+,Header 2 ("this-is-heading-2",[],[]) [Str "This",Space,Str "is",Space,Str "Heading",Space,Str "2"]
+,BlockQuote
+ [Para [Str "This",Space,Str "is",Space,Str "Quote"]
+ ,Para [Str "This",Space,Str "is",Space,Str "Block",Space,Str "Text"]]
+,BulletList
+ [[Para [Str "This",Space,Str "is",Space,Str "list",Space,Str "item",Space,Str "1"]]
+ ,[Para [Str "This",Space,Str "is",Space,Str "list",Space,Str "item",Space,Str "2"]]]]
diff --git a/test/docx/image.docx b/test/docx/image.docx
new file mode 100644
index 000000000..674956e7a
--- /dev/null
+++ b/test/docx/image.docx
Binary files differ
diff --git a/test/docx/image_no_embed.native b/test/docx/image_no_embed.native
new file mode 100644
index 000000000..5f413dbf8
--- /dev/null
+++ b/test/docx/image_no_embed.native
@@ -0,0 +1,2 @@
+[Para [Str "An",Space,Str "image:"]
+,Para [Image ("",[],[("width","6.5in"),("height","5.508333333333334in")]) [Str "He",Space,Str "realizes",Space,Str "he's",Space,Str "making",Space,Str "the",Space,Str "file-size",Space,Str "too",Space,Str "big."] ("media/image1.jpg","An unhappy fish.")]]
diff --git a/test/docx/image_no_embed_writer.native b/test/docx/image_no_embed_writer.native
new file mode 100644
index 000000000..91e7f6f2b
--- /dev/null
+++ b/test/docx/image_no_embed_writer.native
@@ -0,0 +1,2 @@
+[Para [Str "An",Space,Str "image:"]
+,Para [Image ("",[],[("width","0.4166666666666667in"),("height","0.4166666666666667in")]) [Str "He",Space,Str "realizes",Space,Str "he's",Space,Str "making",Space,Str "the",Space,Str "file-size",Space,Str "too",Space,Str "big."] ("media/rId25.jpg","An unhappy fish.")]]
diff --git a/test/docx/image_vml.docx b/test/docx/image_vml.docx
new file mode 100644
index 000000000..9e4018e00
--- /dev/null
+++ b/test/docx/image_vml.docx
Binary files differ
diff --git a/test/docx/image_vml.native b/test/docx/image_vml.native
new file mode 100644
index 000000000..e9fded614
--- /dev/null
+++ b/test/docx/image_vml.native
@@ -0,0 +1,4 @@
+[Header 1 ("vml-image",[],[]) [Strong [Str "VML",Space,Str "Image"]]
+,BlockQuote
+ [Para [Str "It",Space,Str "should",Space,Str "follow",Space,Str "below:"]
+ ,Para [Image ("",[],[]) [] ("media/image4.jpeg","")]]]
diff --git a/test/docx/inline_code.docx b/test/docx/inline_code.docx
new file mode 100644
index 000000000..75c5ea3cb
--- /dev/null
+++ b/test/docx/inline_code.docx
Binary files differ
diff --git a/test/docx/inline_code.native b/test/docx/inline_code.native
new file mode 100644
index 000000000..11cf2777c
--- /dev/null
+++ b/test/docx/inline_code.native
@@ -0,0 +1 @@
+[Para [Str "This",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "of",Space,Code ("",[],[]) "inline code",Space,Str "with",Space,Str "three",Space,Str "spaces."]]
diff --git a/test/docx/inline_formatting.docx b/test/docx/inline_formatting.docx
new file mode 100644
index 000000000..eccf26425
--- /dev/null
+++ b/test/docx/inline_formatting.docx
Binary files differ
diff --git a/test/docx/inline_formatting.native b/test/docx/inline_formatting.native
new file mode 100644
index 000000000..22d8f79e8
--- /dev/null
+++ b/test/docx/inline_formatting.native
@@ -0,0 +1,5 @@
+[Para [Str "Regular",Space,Str "text",Space,Emph [Str "italics"],Space,Strong [Str "bold",Space,Emph [Str "bold",Space,Str "italics"]],Str "."]
+,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "Small",Space,Str "Caps"],Str ",",Space,Str "and",Space,Str "this",Space,Str "is",Space,Strikeout [Str "strikethrough"],Str "."]
+,Para [Str "Some",Space,Str "people",Space,Str "use",Space,Emph [Str "single",Space,Str "underlines",Space,Str "for",Space,Emph [Str "emphasis"]],Str "."]
+,Para [Str "Above",Space,Str "the",Space,Str "line",Space,Str "is",Space,Superscript [Str "superscript"],Space,Str "and",Space,Str "below",Space,Str "the",Space,Str "line",Space,Str "is",Space,Subscript [Str "subscript"],Str "."]
+,Para [Str "A",Space,Str "line",LineBreak,Str "break."]]
diff --git a/test/docx/inline_formatting_writer.native b/test/docx/inline_formatting_writer.native
new file mode 100644
index 000000000..be346204e
--- /dev/null
+++ b/test/docx/inline_formatting_writer.native
@@ -0,0 +1,5 @@
+[Para [Str "Regular",Space,Str "text",Space,Emph [Str "italics"],Space,Strong [Str "bold",Space,Emph [Str "bold",Space,Str "italics"]],Str "."]
+,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "Small",Space,Str "Caps"],Str ",",Space,Str "and",Space,Str "this",Space,Str "is",Space,Strikeout [Str "strikethrough"],Str "."]
+,Para [Str "Some",Space,Str "people",Space,Str "use",Space,Emph [Str "single",Space,Str "underlines",Space,Str "for",Space,Str "emphasis"],Str "."]
+,Para [Str "Above",Space,Str "the",Space,Str "line",Space,Str "is",Space,Superscript [Str "superscript"],Space,Str "and",Space,Str "below",Space,Str "the",Space,Str "line",Space,Str "is",Space,Subscript [Str "subscript"],Str "."]
+,Para [Str "A",Space,Str "line",LineBreak,Str "break."]]
diff --git a/test/docx/inline_images.docx b/test/docx/inline_images.docx
new file mode 100644
index 000000000..2f01a251e
--- /dev/null
+++ b/test/docx/inline_images.docx
Binary files differ
diff --git a/test/docx/inline_images.native b/test/docx/inline_images.native
new file mode 100644
index 000000000..389ae5db6
--- /dev/null
+++ b/test/docx/inline_images.native
@@ -0,0 +1,2 @@
+[Para [Str "This",Space,Str "picture",Space,Image ("",[],[("width","0.8888888888888888in"),("height","0.8888888888888888in")]) [Str "This",Space,Str "one",Space,Str "is",Space,Str "green",Space,Str "and",Space,Str "looks",Space,Str "like",Space,Str "Sideshow",Space,Str "Bob."] ("media/image1.jpg","First identicon"),Space,Str "is",Space,Str "an",Space,Str "identicon."]
+,Para [Str "Here",Space,Str "is",Space,Link ("",[],[]) [Str "one",Space,Image ("",[],[("width","0.8888888888888888in"),("height","0.8888888888888888in")]) [Str "This",Space,Str "one",Space,Str "is",Space,Str "reddish,",Space,Str "and",Space,Str "looks",Space,Str "like",Space,Str "a",Space,Str "heart",Space,Str "that",Space,Str "has",Space,Str "leaked",Space,Str "out."] ("media/image2.jpg","Second identicon"),Space,Str "that"] ("http://www.google.com",""),Space,Str "links."]]
diff --git a/test/docx/inline_images_writer.native b/test/docx/inline_images_writer.native
new file mode 100644
index 000000000..e5dfa5b58
--- /dev/null
+++ b/test/docx/inline_images_writer.native
@@ -0,0 +1,2 @@
+[Para [Str "This",Space,Str "picture",Space,Image ("",[],[("width","0.4166666666666667in"),("height","0.4166666666666667in")]) [] ("media/rId26.jpg",""),Space,Str "is",Space,Str "an",Space,Str "identicon."]
+,Para [Str "Here",Space,Str "is",Space,Link ("",[],[]) [Str "one",Space,Image ("",[],[("width","0.4166666666666667in"),("height","0.4166666666666667in")]) [] ("media/rId26.jpg",""),Space,Str "that"] ("http://www.google.com",""),Space,Str "links."]]
diff --git a/test/docx/link_in_notes.docx b/test/docx/link_in_notes.docx
new file mode 100644
index 000000000..f3398f438
--- /dev/null
+++ b/test/docx/link_in_notes.docx
Binary files differ
diff --git a/test/docx/link_in_notes.native b/test/docx/link_in_notes.native
new file mode 100644
index 000000000..b20358698
--- /dev/null
+++ b/test/docx/link_in_notes.native
@@ -0,0 +1 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Note [Para [Link ("",[],[]) [Str "http://wikipedia.org/"] ("http://wikipedia.org/","")]],Str "."]]
diff --git a/test/docx/links.docx b/test/docx/links.docx
new file mode 100644
index 000000000..80fecacaf
--- /dev/null
+++ b/test/docx/links.docx
Binary files differ
diff --git a/test/docx/links.native b/test/docx/links.native
new file mode 100644
index 000000000..2c4688629
--- /dev/null
+++ b/test/docx/links.native
@@ -0,0 +1,7 @@
+[Header 2 ("an-internal-link-and-an-external-link",[],[]) [Str "An",Space,Str "internal",Space,Str "link",Space,Str "and",Space,Str "an",Space,Str "external",Space,Str "link"]
+,Para [Str "An",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://google.com",""),Space,Str "to",Space,Str "a",Space,Str "popular",Space,Str "website."]
+,Para [Str "An",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://pandoc.org/README.html#synopsis",""),Space,Str "to",Space,Str "a",Space,Str "website",Space,Str "with",Space,Str "an",Space,Str "anchor."]
+,Para [Str "An",Space,Link ("",[],[]) [Str "internal",Space,Str "link"] ("#a-section-for-testing-link-targets",""),Space,Str "to",Space,Str "a",Space,Str "section",Space,Str "header."]
+,Para [Str "An",Space,Link ("",[],[]) [Str "internal",Space,Str "link"] ("#my_bookmark",""),Space,Str "to",Space,Str "a",Space,Str "bookmark."]
+,Header 2 ("a-section-for-testing-link-targets",[],[]) [Str "A",Space,Str "section",Space,Str "for",Space,Str "testing",Space,Str "link",Space,Str "targets"]
+,Para [Str "A",Space,Str "bookmark",Space,Str "right",Space,Span ("my_bookmark",["anchor"],[]) [],Str "here"]]
diff --git a/test/docx/links_writer.native b/test/docx/links_writer.native
new file mode 100644
index 000000000..48c1bcd81
--- /dev/null
+++ b/test/docx/links_writer.native
@@ -0,0 +1,6 @@
+[Header 2 ("an-internal-link-and-an-external-link",[],[]) [Str "An",Space,Str "internal",Space,Str "link",Space,Str "and",Space,Str "an",Space,Str "external",Space,Str "link"]
+,Para [Str "An",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://google.com",""),Space,Str "to",Space,Str "a",Space,Str "popular",Space,Str "website."]
+,Para [Str "An",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://pandoc.org/README.html#synopsis",""),Space,Str "to",Space,Str "a",Space,Str "website",Space,Str "with",Space,Str "an",Space,Str "anchor."]
+,Para [Str "An",Space,Link ("",[],[]) [Str "internal",Space,Str "link"] ("#a-section-for-testing-link-targets",""),Space,Str "to",Space,Str "a",Space,Str "section",Space,Str "header."]
+,Para [Str "An",Space,Link ("",[],[]) [Str "internal",Space,Str "link"] ("#my_bookmark",""),Space,Str "to",Space,Str "a",Space,Str "bookmark."]
+,Header 2 ("a-section-for-testing-link-targets",[],[]) [Str "A",Space,Str "section",Space,Str "for",Space,Str "testing",Space,Str "link",Space,Str "targets"]]
diff --git a/test/docx/lists.docx b/test/docx/lists.docx
new file mode 100644
index 000000000..bf7fd8ae4
--- /dev/null
+++ b/test/docx/lists.docx
Binary files differ
diff --git a/test/docx/lists.native b/test/docx/lists.native
new file mode 100644
index 000000000..af922b335
--- /dev/null
+++ b/test/docx/lists.native
@@ -0,0 +1,18 @@
+[Header 2 ("some-nested-lists",[],[]) [Str "Some",Space,Str "nested",Space,Str "lists"]
+,OrderedList (1,Decimal,Period)
+ [[Para [Str "one"]]
+ ,[Para [Str "two"]
+ ,OrderedList (1,LowerAlpha,DefaultDelim)
+ [[Para [Str "a"]]
+ ,[Para [Str "b"]]]]]
+,BulletList
+ [[Para [Str "one"]]
+ ,[Para [Str "two"]
+ ,BulletList
+ [[Para [Str "three"]
+ ,BulletList
+ [[Para [Str "four"]
+ ,Para [Str "Sub",Space,Str "paragraph"]]]]]]
+ ,[Para [Str "Same",Space,Str "list"]]]
+,BulletList
+ [[Para [Str "Different",Space,Str "list",Space,Str "adjacent",Space,Str "to",Space,Str "the",Space,Str "one",Space,Str "above."]]]]
diff --git a/test/docx/lists_writer.native b/test/docx/lists_writer.native
new file mode 100644
index 000000000..4c44ea603
--- /dev/null
+++ b/test/docx/lists_writer.native
@@ -0,0 +1,17 @@
+[Header 2 ("some-nested-lists",[],[]) [Str "Some",Space,Str "nested",Space,Str "lists"]
+,OrderedList (1,Decimal,Period)
+ [[Para [Str "one"]]
+ ,[Para [Str "two"]
+ ,OrderedList (1,LowerAlpha,DefaultDelim)
+ [[Para [Str "a"]]
+ ,[Para [Str "b"]]]]]
+,BulletList
+ [[Para [Str "one"]]
+ ,[Para [Str "two"]
+ ,BulletList
+ [[Para [Str "three"]
+ ,BulletList
+ [[Para [Str "four"]]]]]]
+ ,[Para [Str "Same",Space,Str "list"]]]
+,BulletList
+ [[Para [Str "Different",Space,Str "list",Space,Str "adjacent",Space,Str "to",Space,Str "the",Space,Str "one",Space,Str "above."]]]]
diff --git a/test/docx/metadata.docx b/test/docx/metadata.docx
new file mode 100644
index 000000000..ccf50b475
--- /dev/null
+++ b/test/docx/metadata.docx
Binary files differ
diff --git a/test/docx/metadata.native b/test/docx/metadata.native
new file mode 100644
index 000000000..ed7ba63cf
--- /dev/null
+++ b/test/docx/metadata.native
@@ -0,0 +1,2 @@
+Pandoc (Meta {unMeta = fromList [("abstract",MetaInlines [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]),("author",MetaList [MetaInlines [Str "Mary",Space,Str "Ann",Space,Str "Evans"],MetaInlines [Str "Aurore",Space,Str "Dupin"]]),("date",MetaInlines [Str "July",Space,Str "28,",Space,Str "2014"]),("title",MetaInlines [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"])]})
+[Para [Str "And",Space,Str "now",Space,Str "this",Space,Str "is",Space,Str "normal",Space,Str "text."]]
diff --git a/test/docx/metadata_after_normal.docx b/test/docx/metadata_after_normal.docx
new file mode 100644
index 000000000..b94a016cb
--- /dev/null
+++ b/test/docx/metadata_after_normal.docx
Binary files differ
diff --git a/test/docx/metadata_after_normal.native b/test/docx/metadata_after_normal.native
new file mode 100644
index 000000000..f0e31f8da
--- /dev/null
+++ b/test/docx/metadata_after_normal.native
@@ -0,0 +1,7 @@
+Pandoc (Meta {unMeta = fromList [("abstract",MetaInlines [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]),("author",MetaList [MetaInlines [Str "Mary",Space,Str "Ann",Space,Str "Evans"],MetaInlines [Str "Aurore",Space,Str "Dupin"]]),("date",MetaInlines [Str "July",Space,Str "28,",Space,Str "2014"]),("title",MetaInlines [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"])]})
+[Para [Str "And",Space,Str "now",Space,Str "this",Space,Str "is",Space,Str "normal",Space,Str "text."]
+,Para [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"]
+,Para [Str "Mary",Space,Str "Ann",Space,Str "Evans"]
+,Para [Str "Aurore",Space,Str "Dupin"]
+,Para [Str "July",Space,Str "28,",Space,Str "2014"]
+,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]]
diff --git a/test/docx/nested_anchors_in_header.docx b/test/docx/nested_anchors_in_header.docx
new file mode 100644
index 000000000..ddebb7ff4
--- /dev/null
+++ b/test/docx/nested_anchors_in_header.docx
Binary files differ
diff --git a/test/docx/nested_anchors_in_header.native b/test/docx/nested_anchors_in_header.native
new file mode 100644
index 000000000..e2b6eb1ef
--- /dev/null
+++ b/test/docx/nested_anchors_in_header.native
@@ -0,0 +1,10 @@
+[Header 1 ("short-instructions",[],[]) [Str "Short",Space,Str "instructions"]
+,Para [Link ("",[],[]) [Str "Open",Space,Str "remote",Space,Str "folder"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening","")]
+,Para [Str "Do",Space,Str "staff"]
+,Para [Link ("",[],[]) [Str "Close",Space,Str "remote",Space,Str "folder"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing","")]
+,Header 1 ("some-instructions",[],[]) [Str "Some",Space,Str "instructions"]
+,Para [Str "Lines"]
+,Header 2 ("remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "opening"]
+,Para [Str "Open",Space,Str "folder"]
+,Header 2 ("remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "closing"]
+,Para [Str "Close",Space,Str "folder"]]
diff --git a/test/docx/normalize.docx b/test/docx/normalize.docx
new file mode 100644
index 000000000..b4fc55818
--- /dev/null
+++ b/test/docx/normalize.docx
Binary files differ
diff --git a/test/docx/normalize.native b/test/docx/normalize.native
new file mode 100644
index 000000000..aeba672c4
--- /dev/null
+++ b/test/docx/normalize.native
@@ -0,0 +1,2 @@
+[Para [Str "These",Space,Str "are",Space,Str "different",Space,Str "fonts."]
+,Para [Strong [Str "These",Space,Emph [Str "are",Space,Strikeout [Str "different"]],Space,Str "fonts."]]]
diff --git a/test/docx/notes.docx b/test/docx/notes.docx
new file mode 100644
index 000000000..eb6fa12d4
--- /dev/null
+++ b/test/docx/notes.docx
Binary files differ
diff --git a/test/docx/notes.native b/test/docx/notes.native
new file mode 100644
index 000000000..ec1b414b6
--- /dev/null
+++ b/test/docx/notes.native
@@ -0,0 +1,2 @@
+[Header 2 ("a-footnote",[],[]) [Str "A",Space,Str "footnote"]
+,Para [Str "Test",Space,Str "footnote.",Note [Para [Str "My",Space,Str "note."]],Space,Str "Test",Space,Str "endnote.",Note [Para [Str "This",Space,Str "is",Space,Str "an",Space,Str "endnote",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]]]]
diff --git a/test/docx/numbered_header.docx b/test/docx/numbered_header.docx
new file mode 100644
index 000000000..66ce7648d
--- /dev/null
+++ b/test/docx/numbered_header.docx
Binary files differ
diff --git a/test/docx/numbered_header.native b/test/docx/numbered_header.native
new file mode 100644
index 000000000..a8dd1e897
--- /dev/null
+++ b/test/docx/numbered_header.native
@@ -0,0 +1 @@
+[Header 1 ("a-numbered-header.",[],[]) [Str "A",Space,Str "Numbered",Space,Str "Header."]]
diff --git a/test/docx/special_punctuation.docx b/test/docx/special_punctuation.docx
new file mode 100644
index 000000000..8e0bb55c9
--- /dev/null
+++ b/test/docx/special_punctuation.docx
Binary files differ
diff --git a/test/docx/special_punctuation.native b/test/docx/special_punctuation.native
new file mode 100644
index 000000000..304289f44
--- /dev/null
+++ b/test/docx/special_punctuation.native
@@ -0,0 +1,2 @@
+[Para [Str "Soft",Space,Str "hyphen:",Space,Str "[\173]"]
+,Para [Str "Non-breaking",Space,Str "hyphen:",Space,Str "[\8209]"]]
diff --git a/test/docx/table_one_row.docx b/test/docx/table_one_row.docx
new file mode 100644
index 000000000..f7e0ebe43
--- /dev/null
+++ b/test/docx/table_one_row.docx
Binary files differ
diff --git a/test/docx/table_one_row.native b/test/docx/table_one_row.native
new file mode 100644
index 000000000..1ea1b446c
--- /dev/null
+++ b/test/docx/table_one_row.native
@@ -0,0 +1,7 @@
+[Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
+ [[]
+ ,[]
+ ,[]]
+ [[[Plain [Str "One"]]
+ ,[Plain [Str "Row"]]
+ ,[Plain [Str "Table"]]]]]
diff --git a/test/docx/table_with_list_cell.docx b/test/docx/table_with_list_cell.docx
new file mode 100644
index 000000000..1db065770
--- /dev/null
+++ b/test/docx/table_with_list_cell.docx
Binary files differ
diff --git a/test/docx/table_with_list_cell.native b/test/docx/table_with_list_cell.native
new file mode 100644
index 000000000..81bb15a1e
--- /dev/null
+++ b/test/docx/table_with_list_cell.native
@@ -0,0 +1,11 @@
+[Table [] [AlignDefault,AlignDefault] [0.0,0.0]
+ [[Plain [Str "Cell",Space,Str "with",Space,Str "text"]]
+ ,[Plain [Str "Cell",Space,Str "with",Space,Str "text"]]]
+ [[[BulletList
+ [[Para [Str "Cell",Space,Str "with"]]
+ ,[Para [Str "A"]]
+ ,[Para [Str "Bullet",Space,Str "list"]]]]
+ ,[OrderedList (1,Decimal,Period)
+ [[Para [Str "Cell",Space,Str "with"]]
+ ,[Para [Str "A"]]
+ ,[Para [Str "Numbered",Space,Str "list."]]]]]]]
diff --git a/test/docx/tables.docx b/test/docx/tables.docx
new file mode 100644
index 000000000..28087ead5
--- /dev/null
+++ b/test/docx/tables.docx
Binary files differ
diff --git a/test/docx/tables.native b/test/docx/tables.native
new file mode 100644
index 000000000..ae326950a
--- /dev/null
+++ b/test/docx/tables.native
@@ -0,0 +1,36 @@
+[Header 2 ("a-table-with-and-without-a-header-row",[],[]) [Str "A",Space,Str "table,",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "a",Space,Str "header",Space,Str "row"]
+,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0,0.0]
+ [[Plain [Str "Name"]]
+ ,[Plain [Str "Game"]]
+ ,[Plain [Str "Fame"]]
+ ,[Plain [Str "Blame"]]]
+ [[[Plain [Str "Lebron",Space,Str "James"]]
+ ,[Plain [Str "Basketball"]]
+ ,[Plain [Str "Very",Space,Str "High"]]
+ ,[Plain [Str "Leaving",Space,Str "Cleveland"]]]
+ ,[[Plain [Str "Ryan",Space,Str "Braun"]]
+ ,[Plain [Str "Baseball"]]
+ ,[Plain [Str "Moderate"]]
+ ,[Plain [Str "Steroids"]]]
+ ,[[Plain [Str "Russell",Space,Str "Wilson"]]
+ ,[Plain [Str "Football"]]
+ ,[Plain [Str "High"]]
+ ,[Plain [Str "Tacky",Space,Str "uniform"]]]]
+,Table [] [AlignDefault,AlignDefault] [0.0,0.0]
+ [[]
+ ,[]]
+ [[[Plain [Str "Sinple"]]
+ ,[Plain [Str "Table"]]]
+ ,[[Plain [Str "Without"]]
+ ,[Plain [Str "Header"]]]]
+,Table [] [AlignDefault,AlignDefault] [0.0,0.0]
+ [[]
+ ,[]]
+ [[[Para [Str "Simple"]
+ ,Para [Str "Multiparagraph"]]
+ ,[Para [Str "Table"]
+ ,Para [Str "Full"]]]
+ ,[[Para [Str "Of"]
+ ,Para [Str "Paragraphs"]]
+ ,[Para [Str "In",Space,Str "each"]
+ ,Para [Str "Cell."]]]]]
diff --git a/test/docx/tabs.docx b/test/docx/tabs.docx
new file mode 100644
index 000000000..6ff5f4bb1
--- /dev/null
+++ b/test/docx/tabs.docx
Binary files differ
diff --git a/test/docx/tabs.native b/test/docx/tabs.native
new file mode 100644
index 000000000..05461f20b
--- /dev/null
+++ b/test/docx/tabs.native
@@ -0,0 +1,2 @@
+[Para [Str "Some",Space,Str "text",Space,Str "separated",Space,Str "by",Space,Str "a",Space,Str "tab."]
+,Para [Str "Tab-indented",Space,Str "text."]]
diff --git a/test/docx/track_changes_deletion.docx b/test/docx/track_changes_deletion.docx
new file mode 100644
index 000000000..5cfdbeed8
--- /dev/null
+++ b/test/docx/track_changes_deletion.docx
Binary files differ
diff --git a/test/docx/track_changes_deletion_accept.native b/test/docx/track_changes_deletion_accept.native
new file mode 100644
index 000000000..205c67810
--- /dev/null
+++ b/test/docx/track_changes_deletion_accept.native
@@ -0,0 +1 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "a",Space,Str "deletion."]]
diff --git a/test/docx/track_changes_deletion_all.native b/test/docx/track_changes_deletion_all.native
new file mode 100644
index 000000000..7f4ed2a90
--- /dev/null
+++ b/test/docx/track_changes_deletion_all.native
@@ -0,0 +1 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "a",Span ("",["deletion"],[("author","eng-dept"),("date","2014-06-25T10:42:00Z")]) [Str "n",Space,Str "excessively",Space,Str "modified"],Space,Str "deletion."]]
diff --git a/test/docx/track_changes_deletion_reject.native b/test/docx/track_changes_deletion_reject.native
new file mode 100644
index 000000000..04283bee5
--- /dev/null
+++ b/test/docx/track_changes_deletion_reject.native
@@ -0,0 +1 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "an",Space,Str "excessively",Space,Str "modified",Space,Str "deletion."]]
diff --git a/test/docx/track_changes_insertion.docx b/test/docx/track_changes_insertion.docx
new file mode 100644
index 000000000..fbdc9003e
--- /dev/null
+++ b/test/docx/track_changes_insertion.docx
Binary files differ
diff --git a/test/docx/track_changes_insertion_accept.native b/test/docx/track_changes_insertion_accept.native
new file mode 100644
index 000000000..ca2e46df0
--- /dev/null
+++ b/test/docx/track_changes_insertion_accept.native
@@ -0,0 +1 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "two",Space,Str "exciting",Space,Str "insertions."]]
diff --git a/test/docx/track_changes_insertion_all.native b/test/docx/track_changes_insertion_all.native
new file mode 100644
index 000000000..12664e425
--- /dev/null
+++ b/test/docx/track_changes_insertion_all.native
@@ -0,0 +1 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Span ("",["insertion"],[("author","eng-dept"),("date","2014-06-25T10:40:00Z")]) [Str "two",Space,Str "exciting"],Space,Str "insertions."]]
diff --git a/test/docx/track_changes_insertion_reject.native b/test/docx/track_changes_insertion_reject.native
new file mode 100644
index 000000000..def000abd
--- /dev/null
+++ b/test/docx/track_changes_insertion_reject.native
@@ -0,0 +1 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "insertions."]]
diff --git a/test/docx/track_changes_move.docx b/test/docx/track_changes_move.docx
new file mode 100644
index 000000000..b70779fd4
--- /dev/null
+++ b/test/docx/track_changes_move.docx
Binary files differ
diff --git a/test/docx/track_changes_move_accept.native b/test/docx/track_changes_move_accept.native
new file mode 100644
index 000000000..0cf276768
--- /dev/null
+++ b/test/docx/track_changes_move_accept.native
@@ -0,0 +1,3 @@
+[Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "text."]
+,Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "text",Space,Str "to",Space,Str "be",Space,Str "moved."]
+,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "more",Space,Str "text."]]
diff --git a/test/docx/track_changes_move_all.native b/test/docx/track_changes_move_all.native
new file mode 100644
index 000000000..3afae83a5
--- /dev/null
+++ b/test/docx/track_changes_move_all.native
@@ -0,0 +1,4 @@
+[Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "text."]
+,Para [Span ("",["insertion"],[("author","Jesse Rosenthal"),("date","2016-04-16T08:20:00Z")]) [Str "Here",Space,Str "is",Space,Str "the",Space,Str "text",Space,Str "to",Space,Str "be",Space,Str "moved."]]
+,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "more",Space,Str "text."]
+,Para [Span ("",["deletion"],[("author","Jesse Rosenthal"),("date","2016-04-16T08:20:00Z")]) [Str "Here",Space,Str "is",Space,Str "the",Space,Str "text",Space,Str "to",Space,Str "be",Space,Str "moved."]]]
diff --git a/test/docx/track_changes_move_reject.native b/test/docx/track_changes_move_reject.native
new file mode 100644
index 000000000..9c57871b6
--- /dev/null
+++ b/test/docx/track_changes_move_reject.native
@@ -0,0 +1,3 @@
+[Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "text."]
+,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "more",Space,Str "text."]
+,Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "text",Space,Str "to",Space,Str "be",Space,Str "moved."]]
diff --git a/test/docx/trailing_spaces_in_formatting.docx b/test/docx/trailing_spaces_in_formatting.docx
new file mode 100644
index 000000000..ebe7404a9
--- /dev/null
+++ b/test/docx/trailing_spaces_in_formatting.docx
Binary files differ
diff --git a/test/docx/trailing_spaces_in_formatting.native b/test/docx/trailing_spaces_in_formatting.native
new file mode 100644
index 000000000..46ea9bca8
--- /dev/null
+++ b/test/docx/trailing_spaces_in_formatting.native
@@ -0,0 +1 @@
+[Para [Str "Turn",Space,Str "my",Space,Emph [Str "formatting"],Space,Str "off",Space,Str "after",Space,Str "the",Space,Str "spaces."]]
diff --git a/test/docx/unicode.docx b/test/docx/unicode.docx
new file mode 100644
index 000000000..cf902c6c6
--- /dev/null
+++ b/test/docx/unicode.docx
Binary files differ
diff --git a/test/docx/unicode.native b/test/docx/unicode.native
new file mode 100644
index 000000000..aee7ef74b
--- /dev/null
+++ b/test/docx/unicode.native
@@ -0,0 +1 @@
+[Para [Str "Hello,",Space,Str "\19990\30028.",Space,Str "This",Space,Str "costs",Space,Str "\8364\&10.\8744\8744("]]
diff --git a/test/docx/verbatim_subsuper.docx b/test/docx/verbatim_subsuper.docx
new file mode 100644
index 000000000..2cb0dc16d
--- /dev/null
+++ b/test/docx/verbatim_subsuper.docx
Binary files differ
diff --git a/test/docx/verbatim_subsuper.native b/test/docx/verbatim_subsuper.native
new file mode 100644
index 000000000..2e11e646a
--- /dev/null
+++ b/test/docx/verbatim_subsuper.native
@@ -0,0 +1,8 @@
+[Para [Str "m",Superscript [Str "2"]]
+,Para [Str "m",Superscript [Code ("",[],[]) "2"]]
+,Para [Code ("",[],[]) "m",Superscript [Str "2"]]
+,Para [Code ("",[],[]) "m",Superscript [Code ("",[],[]) "2"]]
+,Para [Str "m",Subscript [Str "2"]]
+,Para [Str "m",Subscript [Code ("",[],[]) "2"]]
+,Para [Code ("",[],[]) "m",Subscript [Str "2"]]
+,Para [Code ("",[],[]) "m",Subscript [Code ("",[],[]) "2"]]]