Docx reader: Add tests for avoiding zero-level header.

This commit is contained in:
Jesse Rosenthal 2017-08-06 19:36:25 -07:00
parent a36a56b8ac
commit a67a96b932
3 changed files with 29 additions and 0 deletions

View file

@ -185,6 +185,10 @@ tests = [ testGroup "inlines"
"headers already having auto identifiers"
"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"

Binary file not shown.

View file

@ -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."]]