summaryrefslogtreecommitdiff
path: root/test/docx
diff options
context:
space:
mode:
Diffstat (limited to 'test/docx')
-rw-r--r--test/docx/0_level_headers.docxbin0 -> 35146 bytes
-rw-r--r--test/docx/0_level_headers.native25
-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-no-styles.native4
-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-with-styles.native7
-rw-r--r--test/docx/custom_style.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/golden/block_quotes.docxbin0 -> 9778 bytes
-rw-r--r--test/docx/golden/codeblock.docxbin0 -> 9638 bytes
-rw-r--r--test/docx/golden/comments.docxbin0 -> 9960 bytes
-rw-r--r--test/docx/golden/custom_style_no_reference.docxbin0 -> 9724 bytes
-rw-r--r--test/docx/golden/custom_style_reference.docxbin0 -> 12118 bytes
-rw-r--r--test/docx/golden/definition_list.docxbin0 -> 9617 bytes
-rw-r--r--test/docx/golden/headers.docxbin0 -> 9765 bytes
-rw-r--r--test/docx/golden/image.docxbin0 -> 26452 bytes
-rw-r--r--test/docx/golden/inline_code.docxbin0 -> 9560 bytes
-rw-r--r--test/docx/golden/inline_formatting.docxbin0 -> 9737 bytes
-rw-r--r--test/docx/golden/inline_images.docxbin0 -> 26506 bytes
-rw-r--r--test/docx/golden/link_in_notes.docxbin0 -> 9781 bytes
-rw-r--r--test/docx/golden/links.docxbin0 -> 9960 bytes
-rw-r--r--test/docx/golden/lists.docxbin0 -> 10031 bytes
-rw-r--r--test/docx/golden/lists_continuing.docxbin0 -> 9830 bytes
-rw-r--r--test/docx/golden/lists_restarting.docxbin0 -> 9830 bytes
-rw-r--r--test/docx/golden/nested_anchors_in_header.docxbin0 -> 9882 bytes
-rw-r--r--test/docx/golden/notes.docxbin0 -> 9731 bytes
-rw-r--r--test/docx/golden/table_one_row.docxbin0 -> 9581 bytes
-rw-r--r--test/docx/golden/table_with_list_cell.docxbin0 -> 9948 bytes
-rw-r--r--test/docx/golden/tables.docxbin0 -> 9963 bytes
-rw-r--r--test/docx/golden/track_changes_deletion.docxbin0 -> 9604 bytes
-rw-r--r--test/docx/golden/track_changes_insertion.docxbin0 -> 9587 bytes
-rw-r--r--test/docx/golden/track_changes_move.docxbin0 -> 9621 bytes
-rw-r--r--test/docx/golden/unicode.docxbin0 -> 9545 bytes
-rw-r--r--test/docx/golden/verbatim_subsuper.docxbin0 -> 9593 bytes
-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/image_writer_test.native8
-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/inline_images_writer_test.native2
-rw-r--r--test/docx/instrText_hyperlink.docxbin0 -> 13628 bytes
-rw-r--r--test/docx/instrText_hyperlink.native1
-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_continuing.docxbin0 -> 17717 bytes
-rw-r--r--test/docx/lists_continuing.native7
-rw-r--r--test/docx/lists_restarting.docxbin0 -> 18189 bytes
-rw-r--r--test/docx/lists_restarting.native8
-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.native15
-rw-r--r--test/docx/nested_sdt.docxbin0 -> 11694 bytes
-rw-r--r--test/docx/nested_sdt.native3
-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/overlapping_targets.docxbin0 -> 13747 bytes
-rw-r--r--test/docx/overlapping_targets.native3
-rw-r--r--test/docx/paragraph_insertion_deletion.docxbin0 -> 12066 bytes
-rw-r--r--test/docx/paragraph_insertion_deletion_accept.native2
-rw-r--r--test/docx/paragraph_insertion_deletion_all.native3
-rw-r--r--test/docx/paragraph_insertion_deletion_reject.native2
-rw-r--r--test/docx/sdt_elements.docxbin0 -> 29409 bytes
-rw-r--r--test/docx/sdt_elements.native10
-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_variable_width.docxbin0 -> 10006 bytes
-rw-r--r--test/docx/table_variable_width.native13
-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/unused_anchors.docxbin0 -> 13276 bytes
-rw-r--r--test/docx/unused_anchors.native3
-rw-r--r--test/docx/verbatim_subsuper.docxbin0 -> 10353 bytes
-rw-r--r--test/docx/verbatim_subsuper.native8
148 files changed, 378 insertions, 0 deletions
diff --git a/test/docx/0_level_headers.docx b/test/docx/0_level_headers.docx
new file mode 100644
index 000000000..7d4699316
--- /dev/null
+++ b/test/docx/0_level_headers.docx
Binary files differ
diff --git a/test/docx/0_level_headers.native b/test/docx/0_level_headers.native
new file mode 100644
index 000000000..804ad8732
--- /dev/null
+++ b/test/docx/0_level_headers.native
@@ -0,0 +1,25 @@
+[Table [] [AlignDefault] [0.0]
+ [[]]
+ [[[]]
+ ,[[Plain [Str "User\8217s",Space,Str "Guide"]]]
+ ,[[]]
+ ,[[]]
+ ,[[]]
+ ,[[Plain [Str "11",Space,Str "August",Space,Str "2017"]]]
+ ,[[]]
+ ,[[]]
+ ,[[]]
+ ,[[]]]
+,Para [Str "CONTENTS"]
+,Para [Strong [Str "Section",Space,Str "Page"]]
+,Para [Str "FIGURES",Space,Str "iv"]
+,Para [Str "TABLES",Space,Str "v"]
+,Para [Str "SECTION",Space,Str "1",Space,Str "Introduction",Space,Str "2"]
+,Header 1 ("figures",["Heading0"],[]) [Str "FIGURES"]
+,Para [Strong [Str "Figure",Space,Str "Page"]]
+,Para [Strong [Str "No",Space,Str "table",Space,Str "of",Space,Str "figures",Space,Str "entries",Space,Str "found."]]
+,Header 1 ("tables",["Heading0"],[]) [Str "TABLES"]
+,Para [Strong [Str "Table",Space,Str "Page"]]
+,Para [Strong [Str "No",Space,Str "table",Space,Str "of",Space,Str "figures",Space,Str "entries",Space,Str "found."]]
+,Header 1 ("introduction",[],[]) [Str "Introduction"]
+,Para [Str "Nothing",Space,Str "to",Space,Str "introduce,",Space,Str "yet."]]
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-no-styles.native b/test/docx/custom-style-no-styles.native
new file mode 100644
index 000000000..b024f16b2
--- /dev/null
+++ b/test/docx/custom-style-no-styles.native
@@ -0,0 +1,4 @@
+[Para [Str "This",Space,Str "is",Space,Str "some",Space,Str "text."]
+,Para [Str "This",Space,Str "is",Space,Str "text",Space,Str "with",Space,Str "an",Space,Emph [Str "emphasized"],Space,Str "text",Space,Str "style.",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "text",Space,Str "with",Space,Str "a",Space,Strong [Str "strengthened"],Space,Str "text",Space,Str "style."]
+,BlockQuote
+ [Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "styled",Space,Str "paragraph",Space,Str "that",Space,Str "inherits",Space,Str "from",Space,Str "Block",Space,Str "Text."]]]
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-with-styles.native b/test/docx/custom-style-with-styles.native
new file mode 100644
index 000000000..61f11911d
--- /dev/null
+++ b/test/docx/custom-style-with-styles.native
@@ -0,0 +1,7 @@
+[Div ("",[],[("custom-style","FirstParagraph")])
+ [Para [Str "This",Space,Str "is",Space,Str "some",Space,Str "text."]]
+,Div ("",[],[("custom-style","BodyText")])
+ [Para [Str "This",Space,Str "is",Space,Str "text",Space,Str "with",Space,Str "an",Space,Span ("",[],[("custom-style","Emphatic")]) [Str "emphasized"],Space,Str "text",Space,Str "style.",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "text",Space,Str "with",Space,Str "a",Space,Span ("",[],[("custom-style","Strengthened")]) [Str "strengthened"],Space,Str "text",Space,Str "style."]]
+,Div ("",[],[("custom-style","MyBlockStyle")])
+ [BlockQuote
+ [Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "styled",Space,Str "paragraph",Space,Str "that",Space,Str "inherits",Space,Str "from",Space,Str "Block",Space,Str "Text."]]]]
diff --git a/test/docx/custom_style.native b/test/docx/custom_style.native
new file mode 100644
index 000000000..c4566ed85
--- /dev/null
+++ b/test/docx/custom_style.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/golden/block_quotes.docx b/test/docx/golden/block_quotes.docx
new file mode 100644
index 000000000..28d6f035e
--- /dev/null
+++ b/test/docx/golden/block_quotes.docx
Binary files differ
diff --git a/test/docx/golden/codeblock.docx b/test/docx/golden/codeblock.docx
new file mode 100644
index 000000000..af85598dc
--- /dev/null
+++ b/test/docx/golden/codeblock.docx
Binary files differ
diff --git a/test/docx/golden/comments.docx b/test/docx/golden/comments.docx
new file mode 100644
index 000000000..33831dc06
--- /dev/null
+++ b/test/docx/golden/comments.docx
Binary files differ
diff --git a/test/docx/golden/custom_style_no_reference.docx b/test/docx/golden/custom_style_no_reference.docx
new file mode 100644
index 000000000..78f56893c
--- /dev/null
+++ b/test/docx/golden/custom_style_no_reference.docx
Binary files differ
diff --git a/test/docx/golden/custom_style_reference.docx b/test/docx/golden/custom_style_reference.docx
new file mode 100644
index 000000000..dfc2c960b
--- /dev/null
+++ b/test/docx/golden/custom_style_reference.docx
Binary files differ
diff --git a/test/docx/golden/definition_list.docx b/test/docx/golden/definition_list.docx
new file mode 100644
index 000000000..c3f076387
--- /dev/null
+++ b/test/docx/golden/definition_list.docx
Binary files differ
diff --git a/test/docx/golden/headers.docx b/test/docx/golden/headers.docx
new file mode 100644
index 000000000..c2b6206a3
--- /dev/null
+++ b/test/docx/golden/headers.docx
Binary files differ
diff --git a/test/docx/golden/image.docx b/test/docx/golden/image.docx
new file mode 100644
index 000000000..95a28a098
--- /dev/null
+++ b/test/docx/golden/image.docx
Binary files differ
diff --git a/test/docx/golden/inline_code.docx b/test/docx/golden/inline_code.docx
new file mode 100644
index 000000000..1d415e411
--- /dev/null
+++ b/test/docx/golden/inline_code.docx
Binary files differ
diff --git a/test/docx/golden/inline_formatting.docx b/test/docx/golden/inline_formatting.docx
new file mode 100644
index 000000000..367654e53
--- /dev/null
+++ b/test/docx/golden/inline_formatting.docx
Binary files differ
diff --git a/test/docx/golden/inline_images.docx b/test/docx/golden/inline_images.docx
new file mode 100644
index 000000000..62c5943ba
--- /dev/null
+++ b/test/docx/golden/inline_images.docx
Binary files differ
diff --git a/test/docx/golden/link_in_notes.docx b/test/docx/golden/link_in_notes.docx
new file mode 100644
index 000000000..c86f9aecd
--- /dev/null
+++ b/test/docx/golden/link_in_notes.docx
Binary files differ
diff --git a/test/docx/golden/links.docx b/test/docx/golden/links.docx
new file mode 100644
index 000000000..652a93569
--- /dev/null
+++ b/test/docx/golden/links.docx
Binary files differ
diff --git a/test/docx/golden/lists.docx b/test/docx/golden/lists.docx
new file mode 100644
index 000000000..5e900feb1
--- /dev/null
+++ b/test/docx/golden/lists.docx
Binary files differ
diff --git a/test/docx/golden/lists_continuing.docx b/test/docx/golden/lists_continuing.docx
new file mode 100644
index 000000000..278edaa99
--- /dev/null
+++ b/test/docx/golden/lists_continuing.docx
Binary files differ
diff --git a/test/docx/golden/lists_restarting.docx b/test/docx/golden/lists_restarting.docx
new file mode 100644
index 000000000..112b824b5
--- /dev/null
+++ b/test/docx/golden/lists_restarting.docx
Binary files differ
diff --git a/test/docx/golden/nested_anchors_in_header.docx b/test/docx/golden/nested_anchors_in_header.docx
new file mode 100644
index 000000000..c2a10b828
--- /dev/null
+++ b/test/docx/golden/nested_anchors_in_header.docx
Binary files differ
diff --git a/test/docx/golden/notes.docx b/test/docx/golden/notes.docx
new file mode 100644
index 000000000..c6093c18a
--- /dev/null
+++ b/test/docx/golden/notes.docx
Binary files differ
diff --git a/test/docx/golden/table_one_row.docx b/test/docx/golden/table_one_row.docx
new file mode 100644
index 000000000..34de65e2e
--- /dev/null
+++ b/test/docx/golden/table_one_row.docx
Binary files differ
diff --git a/test/docx/golden/table_with_list_cell.docx b/test/docx/golden/table_with_list_cell.docx
new file mode 100644
index 000000000..c27f99736
--- /dev/null
+++ b/test/docx/golden/table_with_list_cell.docx
Binary files differ
diff --git a/test/docx/golden/tables.docx b/test/docx/golden/tables.docx
new file mode 100644
index 000000000..4fcdd73c3
--- /dev/null
+++ b/test/docx/golden/tables.docx
Binary files differ
diff --git a/test/docx/golden/track_changes_deletion.docx b/test/docx/golden/track_changes_deletion.docx
new file mode 100644
index 000000000..7b404dba1
--- /dev/null
+++ b/test/docx/golden/track_changes_deletion.docx
Binary files differ
diff --git a/test/docx/golden/track_changes_insertion.docx b/test/docx/golden/track_changes_insertion.docx
new file mode 100644
index 000000000..500a7c239
--- /dev/null
+++ b/test/docx/golden/track_changes_insertion.docx
Binary files differ
diff --git a/test/docx/golden/track_changes_move.docx b/test/docx/golden/track_changes_move.docx
new file mode 100644
index 000000000..05705c040
--- /dev/null
+++ b/test/docx/golden/track_changes_move.docx
Binary files differ
diff --git a/test/docx/golden/unicode.docx b/test/docx/golden/unicode.docx
new file mode 100644
index 000000000..c1626874d
--- /dev/null
+++ b/test/docx/golden/unicode.docx
Binary files differ
diff --git a/test/docx/golden/verbatim_subsuper.docx b/test/docx/golden/verbatim_subsuper.docx
new file mode 100644
index 000000000..d2ada67fa
--- /dev/null
+++ b/test/docx/golden/verbatim_subsuper.docx
Binary files differ
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/image_writer_test.native b/test/docx/image_writer_test.native
new file mode 100644
index 000000000..a0fb3ee3a
--- /dev/null
+++ b/test/docx/image_writer_test.native
@@ -0,0 +1,8 @@
+[Para [Str "No",Space,Str "width",Space,Str "given:"]
+,Para [Image ("",[],[]) [Str "testimg"] ("lalune.jpg","fig:")]
+,Para [Str "With",Space,Str "height",Space,Str "10cm:"]
+,Para [Image ("",[],[("height","10cm")]) [Str "2testimg"] ("lalune.jpg","fig:")]
+,Para [Str "With",Space,Str "width",Space,Str "6cm:"]
+,Para [Image ("",[],[("width","6cm")]) [Str "3testimg"] ("lalune.jpg","fig:")]
+,Header 1 ("with-height-3in-and-width-6in",[],[]) [Str "With",Space,Str "height",Space,Str "3in",Space,Str "and",Space,Str "width",Space,Str "6in:"]
+,Para [Image ("",[],[("width","6in"),("height","3in")]) [Str "4testimg"] ("lalune.jpg","fig:")]] \ No newline at end of file
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..a7aaf9999
--- /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,Span ("",["underline"],[]) [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/inline_images_writer_test.native b/test/docx/inline_images_writer_test.native
new file mode 100644
index 000000000..921a7aff8
--- /dev/null
+++ b/test/docx/inline_images_writer_test.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."] ("lalune.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."] ("lalune.jpg","Second identicon"),Space,Str "that"] ("http://www.google.com",""),Space,Str "links."]]
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"]]
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_continuing.docx b/test/docx/lists_continuing.docx
new file mode 100644
index 000000000..e6249260b
--- /dev/null
+++ b/test/docx/lists_continuing.docx
Binary files differ
diff --git a/test/docx/lists_continuing.native b/test/docx/lists_continuing.native
new file mode 100644
index 000000000..24d352ce5
--- /dev/null
+++ b/test/docx/lists_continuing.native
@@ -0,0 +1,7 @@
+[OrderedList (1,Decimal,Period)
+ [[Para [Str "Foo"]]
+ ,[Para [Str "Bar"]]
+ ,[Para [Str "Baz"]]]
+,Para [Str "Interruption."]
+,OrderedList (4,Decimal,Period)
+ [[Para [Str "Bop"]]]]
diff --git a/test/docx/lists_restarting.docx b/test/docx/lists_restarting.docx
new file mode 100644
index 000000000..4acd67fcb
--- /dev/null
+++ b/test/docx/lists_restarting.docx
Binary files differ
diff --git a/test/docx/lists_restarting.native b/test/docx/lists_restarting.native
new file mode 100644
index 000000000..6602f1262
--- /dev/null
+++ b/test/docx/lists_restarting.native
@@ -0,0 +1,8 @@
+[OrderedList (2,Decimal,Period)
+ [[Para [Str "Foo"]]
+ ,[Para [Str "Bar"]]
+ ,[Para [Str "Baz"]]]
+,BlockQuote
+ [Para [Str "Interruption"]]
+,OrderedList (1,Decimal,Period)
+ [[Para [Str "Bop."]]]]
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..562f60215
--- /dev/null
+++ b/test/docx/nested_anchors_in_header.native
@@ -0,0 +1,15 @@
+[Header 1 ("\1086\1075\1083\1072\1074\1083\1077\1085\1080\1077",["TOCHeading"],[]) [Str "\1054\1075\1083\1072\1074\1083\1077\1085\1080\1077"]
+,Para [Link ("",[],[]) [Str "Short",Space,Str "instructions",Space,Str "1"] ("#short-instructions","")]
+,Para [Link ("",[],[]) [Str "Some",Space,Str "instructions",Space,Str "1"] ("#some-instructions","")]
+,Para [Link ("",[],[]) [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",Space,Str "2"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening","")]
+,Para [Link ("",[],[]) [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",Space,Str "2"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing","")]
+,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/nested_sdt.docx b/test/docx/nested_sdt.docx
new file mode 100644
index 000000000..1a0827db3
--- /dev/null
+++ b/test/docx/nested_sdt.docx
Binary files differ
diff --git a/test/docx/nested_sdt.native b/test/docx/nested_sdt.native
new file mode 100644
index 000000000..d0adc05ac
--- /dev/null
+++ b/test/docx/nested_sdt.native
@@ -0,0 +1,3 @@
+[Para [Str "Test",Space,Str "Paragraph1"]
+,Para [Str "Test",Space,Str "Paragraph2"]
+,Para [Str "Test",Space,Str "Paragraph3"]]
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/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","")]]
diff --git a/test/docx/paragraph_insertion_deletion.docx b/test/docx/paragraph_insertion_deletion.docx
new file mode 100644
index 000000000..9b62f9036
--- /dev/null
+++ b/test/docx/paragraph_insertion_deletion.docx
Binary files differ
diff --git a/test/docx/paragraph_insertion_deletion_accept.native b/test/docx/paragraph_insertion_deletion_accept.native
new file mode 100644
index 000000000..3b0f3b18a
--- /dev/null
+++ b/test/docx/paragraph_insertion_deletion_accept.native
@@ -0,0 +1,2 @@
+[Para [Str "This",Space,Str "is",Space,Str "a"]
+,Para [Str "split",Space,Str "Paragraph."]]
diff --git a/test/docx/paragraph_insertion_deletion_all.native b/test/docx/paragraph_insertion_deletion_all.native
new file mode 100644
index 000000000..4a12938ee
--- /dev/null
+++ b/test/docx/paragraph_insertion_deletion_all.native
@@ -0,0 +1,3 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Span ("",["paragraph-insertion"],[("author","Seeley, Jason"),("date","2017-09-17T16:39:00Z")]) []]
+,Para [Str "split",Span ("",["paragraph-deletion"],[("author","Seeley, Jason"),("date","2017-09-17T16:39:00Z")]) []]
+,Para [Str "Paragraph."]]
diff --git a/test/docx/paragraph_insertion_deletion_reject.native b/test/docx/paragraph_insertion_deletion_reject.native
new file mode 100644
index 000000000..ef7b06423
--- /dev/null
+++ b/test/docx/paragraph_insertion_deletion_reject.native
@@ -0,0 +1,2 @@
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "split"]
+,Para [Str "Paragraph."]]
diff --git a/test/docx/sdt_elements.docx b/test/docx/sdt_elements.docx
new file mode 100644
index 000000000..9356a6b40
--- /dev/null
+++ b/test/docx/sdt_elements.docx
Binary files differ
diff --git a/test/docx/sdt_elements.native b/test/docx/sdt_elements.native
new file mode 100644
index 000000000..7f7768728
--- /dev/null
+++ b/test/docx/sdt_elements.native
@@ -0,0 +1,10 @@
+[Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
+ [[]
+ ,[]
+ ,[]]
+ [[[Plain [Strong [Str "col1Header"]]]
+ ,[Plain [Strong [Str "col2Header"]]]
+ ,[Plain [Strong [Str "col3Header"]]]]
+ ,[[Plain [Str "col1",Space,Str "content"]]
+ ,[Plain [Str "Body",Space,Str "copy"]]
+ ,[Plain [Str "col3",Space,Str "content"]]]]]
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_variable_width.docx b/test/docx/table_variable_width.docx
new file mode 100644
index 000000000..899357968
--- /dev/null
+++ b/test/docx/table_variable_width.docx
Binary files differ
diff --git a/test/docx/table_variable_width.native b/test/docx/table_variable_width.native
new file mode 100644
index 000000000..9d3b961df
--- /dev/null
+++ b/test/docx/table_variable_width.native
@@ -0,0 +1,13 @@
+[Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0,0.0,0.0]
+ [[]
+ ,[]
+ ,[Plain [Str "h3"]]
+ ,[Plain [Str "h4"]]
+ ,[Plain [Str "h5"]]]
+ [[[Plain [Str "c11"]]
+ ,[]
+ ,[]]
+ ,[[]
+ ,[Plain [Str "c22"]]
+ ,[Plain [Str "c23"]]
+ ,[]]]]
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/unused_anchors.docx b/test/docx/unused_anchors.docx
new file mode 100644
index 000000000..416488bbf
--- /dev/null
+++ b/test/docx/unused_anchors.docx
Binary files differ
diff --git a/test/docx/unused_anchors.native b/test/docx/unused_anchors.native
new file mode 100644
index 000000000..051dfe424
--- /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."] ("#Foo","")]
+,Para [Span ("Foo",["anchor"],[]) [],Str "Here",Space,Str "is",Space,Str "the",Space,Str "target."]]
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"]]]