aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Tests/Readers/Docx.hs4
-rw-r--r--test/docx/0_level_headers.docxbin0 -> 35146 bytes
-rw-r--r--test/docx/0_level_headers.native25
3 files changed, 29 insertions, 0 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index e55c3529b..c6ab8f493 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -186,6 +186,10 @@ tests = [ testGroup "inlines"
"docx/already_auto_ident.docx"
"docx/already_auto_ident.native"
, testCompare
+ "avoid zero-level headers"
+ "docx/0_level_headers.docx"
+ "docx/0_level_headers.native"
+ , testCompare
"nested anchor spans in header"
"docx/nested_anchors_in_header.docx"
"docx/nested_anchors_in_header.native"
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."]]