Docx reader tests: test custom style extension.
This commit is contained in:
parent
5262c0853a
commit
ffcecfacb1
3 changed files with 22 additions and 0 deletions
|
@ -372,6 +372,17 @@ tests = [ testGroup "inlines"
|
||||||
"image extraction"
|
"image extraction"
|
||||||
"docx/image.docx"
|
"docx/image.docx"
|
||||||
]
|
]
|
||||||
|
, testGroup "custom styles"
|
||||||
|
[ testCompare
|
||||||
|
"custom styles (`+styles`) not enabled (default)"
|
||||||
|
"docx/custom-style-reference.docx"
|
||||||
|
"docx/custom-style-no-styles.native"
|
||||||
|
, testCompareWithOpts
|
||||||
|
def{readerExtensions=extensionsFromList [Ext_styles]}
|
||||||
|
"custom styles (`+styles`) enabled"
|
||||||
|
"docx/custom-style-reference.docx"
|
||||||
|
"docx/custom-style-with-styles.native"
|
||||||
|
]
|
||||||
, testGroup "metadata"
|
, testGroup "metadata"
|
||||||
[ testCompareWithOpts def{readerStandalone=True}
|
[ testCompareWithOpts def{readerStandalone=True}
|
||||||
"metadata fields"
|
"metadata fields"
|
||||||
|
|
4
test/docx/custom-style-no-styles.native
Normal file
4
test/docx/custom-style-no-styles.native
Normal file
|
@ -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."]]]
|
7
test/docx/custom-style-with-styles.native
Normal file
7
test/docx/custom-style-with-styles.native
Normal file
|
@ -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,Emph [Span ("",[],[("custom-style","Emphatic")]) [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,Strong [Span ("",[],[("custom-style","Strengthened")]) [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."]]]]
|
Loading…
Reference in a new issue