diff options
author | Alexander <ilabdsf@gmail.com> | 2018-04-26 22:33:18 +0300 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-04-26 12:33:18 -0700 |
commit | 1927bc9aac0e822bd6179323e00fe38bee5a2cf3 (patch) | |
tree | 508b3527a8c09dfe72a790f82270691622af407d /test/fb2 | |
parent | 5f0d407279e453107b28ee71fa0e45c5cc93090c (diff) | |
download | pandoc-1927bc9aac0e822bd6179323e00fe38bee5a2cf3.tar.gz |
Add FB2 reader (#4539)
Diffstat (limited to 'test/fb2')
-rw-r--r-- | test/fb2/reader/emphasis.fb2 | 11 | ||||
-rw-r--r-- | test/fb2/reader/emphasis.native | 6 | ||||
-rw-r--r-- | test/fb2/reader/epigraph.fb2 | 18 | ||||
-rw-r--r-- | test/fb2/reader/epigraph.native | 9 | ||||
-rw-r--r-- | test/fb2/reader/meta.fb2 | 26 | ||||
-rw-r--r-- | test/fb2/reader/meta.native | 2 | ||||
-rw-r--r-- | test/fb2/reader/poem.fb2 | 28 | ||||
-rw-r--r-- | test/fb2/reader/poem.native | 14 | ||||
-rw-r--r-- | test/fb2/reader/titles.fb2 | 18 | ||||
-rw-r--r-- | test/fb2/reader/titles.native | 8 |
10 files changed, 140 insertions, 0 deletions
diff --git a/test/fb2/reader/emphasis.fb2 b/test/fb2/reader/emphasis.fb2 new file mode 100644 index 000000000..1a936a9d0 --- /dev/null +++ b/test/fb2/reader/emphasis.fb2 @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink"> + <body> + <section> + <p>Plain, <strong>strong</strong>, <emphasis>emphasis</emphasis>, <strong><emphasis>strong emphasis</emphasis></strong>, <emphasis><strong>emphasized strong</strong></emphasis>.</p> + <p>Strikethrough: <strikethrough>deleted</strikethrough></p> + <p><sub>Subscript</sub> and <sup>superscript</sup></p> + <p>Some <code>code</code></p> + </section> + </body> +</FictionBook> diff --git a/test/fb2/reader/emphasis.native b/test/fb2/reader/emphasis.native new file mode 100644 index 000000000..422e7bb15 --- /dev/null +++ b/test/fb2/reader/emphasis.native @@ -0,0 +1,6 @@ +Pandoc (Meta {unMeta = fromList []}) +[Div ("",["section"],[]) + [Para [Str "Plain,",Space,Strong [Str "strong"],Str ",",Space,Emph [Str "emphasis"],Str ",",Space,Strong [Emph [Str "strong",Space,Str "emphasis"]],Str ",",Space,Emph [Strong [Str "emphasized",Space,Str "strong"]],Str "."] + ,Para [Str "Strikethrough:",Space,Strikeout [Str "deleted"]] + ,Para [Subscript [Str "Subscript"],Space,Str "and",Space,Superscript [Str "superscript"]] + ,Para [Str "Some",Space,Code ("",[],[]) "code"]]] diff --git a/test/fb2/reader/epigraph.fb2 b/test/fb2/reader/epigraph.fb2 new file mode 100644 index 000000000..5bb5cd2ef --- /dev/null +++ b/test/fb2/reader/epigraph.fb2 @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink"> + <body> + <epigraph> + <p>Body epigraph</p> + </epigraph> + <section> + <epigraph> + <p>Section epigraph</p> + </epigraph> + <section> + <epigraph> + <p>Subsection epigraph</p> + </epigraph> + </section> + </section> + </body> +</FictionBook> diff --git a/test/fb2/reader/epigraph.native b/test/fb2/reader/epigraph.native new file mode 100644 index 000000000..a58a3e05b --- /dev/null +++ b/test/fb2/reader/epigraph.native @@ -0,0 +1,9 @@ +Pandoc (Meta {unMeta = fromList []}) +[Div ("",["epigraph"],[]) + [Para [Str "Body",Space,Str "epigraph"]] +,Div ("",["section"],[]) + [Div ("",["epigraph"],[]) + [Para [Str "Section",Space,Str "epigraph"]] + ,Div ("",["section"],[]) + [Div ("",["epigraph"],[]) + [Para [Str "Subsection",Space,Str "epigraph"]]]]] diff --git a/test/fb2/reader/meta.fb2 b/test/fb2/reader/meta.fb2 new file mode 100644 index 000000000..7e1736d64 --- /dev/null +++ b/test/fb2/reader/meta.fb2 @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink"> + <description> + <title-info> + <author> + <first-name>First</first-name> + <middle-name>Middle</middle-name> + <last-name>Last</last-name> + </author> + <author> + <first-name>Another</first-name> + <last-name>Author</last-name> + </author> + <book-title>Book title</book-title> + <annotation> + <p>Book annotation</p> + <p>Second paragraph of book annotation</p> + </annotation> + <keywords>foo, bar, baz</keywords> + <date>2018</date> + </title-info> + </description> + <body> + <title><p>Body title</p></title> + </body> +</FictionBook> diff --git a/test/fb2/reader/meta.native b/test/fb2/reader/meta.native new file mode 100644 index 000000000..71a8795b6 --- /dev/null +++ b/test/fb2/reader/meta.native @@ -0,0 +1,2 @@ +Pandoc (Meta {unMeta = fromList [("abstract",MetaBlocks [Para [Str "Book",Space,Str "annotation"],Para [Str "Second",Space,Str "paragraph",Space,Str "of",Space,Str "book",Space,Str "annotation"]]),("author",MetaList [MetaInlines [Str "First",Space,Str "Middle",Space,Str "Last"],MetaInlines [Str "Another",Space,Str "Author"]]),("date",MetaInlines [Str "2018"]),("keywords",MetaList [MetaString "foo",MetaString "bar",MetaString "baz"]),("title",MetaInlines [Str "Book",Space,Str "title"])]}) +[Header 1 ("",[],[]) [Str "Body",Space,Str "title"]] diff --git a/test/fb2/reader/poem.fb2 b/test/fb2/reader/poem.fb2 new file mode 100644 index 000000000..fcf4a0c02 --- /dev/null +++ b/test/fb2/reader/poem.fb2 @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink"> + <body> + <section> + <poem> + <title> + <p>Poem title</p> + </title> + <epigraph> + <p>Poem epigraph</p> + </epigraph> + <stanza> + <subtitle>Subtitle</subtitle> + <title> + <p>First stanza title</p> + </title> + <v>Verse</v> + <v><emphasis>More</emphasis> verse</v> + </stanza> + <stanza> + <v>One more stanza</v> + </stanza> + <text-author>Author</text-author> + <date>April 2018</date> + </poem> + </section> + </body> +</FictionBook> diff --git a/test/fb2/reader/poem.native b/test/fb2/reader/poem.native new file mode 100644 index 000000000..67be6a672 --- /dev/null +++ b/test/fb2/reader/poem.native @@ -0,0 +1,14 @@ +Pandoc (Meta {unMeta = fromList []}) +[Div ("",["section"],[]) + [Header 2 ("",[],[]) [Str "Poem",Space,Str "title"] + ,Div ("",["epigraph"],[]) + [Para [Str "Poem",Space,Str "epigraph"]] + ,Header 2 ("",["unnumbered"],[]) [Str "Subtitle"] + ,Header 2 ("",[],[]) [Str "First",Space,Str "stanza",Space,Str "title"] + ,LineBlock + [[Str "Verse"] + ,[Emph [Str "More"],Space,Str "verse"]] + ,LineBlock + [[Str "One",Space,Str "more",Space,Str "stanza"]] + ,Para [Str "Author"] + ,Para [Str "April",Space,Str "2018"]]] diff --git a/test/fb2/reader/titles.fb2 b/test/fb2/reader/titles.fb2 new file mode 100644 index 000000000..cfe9588d8 --- /dev/null +++ b/test/fb2/reader/titles.fb2 @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink"> + <body> + <title><p>Body title</p></title> + <section> + <title><p>Section title</p></title> + <section> + <title> + <p>Subsection title</p> + <p>with multiple paragraphs</p> + </title> + </section> + <section> + <title><p>Another subsection title</p></title> + </section> + </section> + </body> +</FictionBook> diff --git a/test/fb2/reader/titles.native b/test/fb2/reader/titles.native new file mode 100644 index 000000000..a6c34f5ea --- /dev/null +++ b/test/fb2/reader/titles.native @@ -0,0 +1,8 @@ +Pandoc (Meta {unMeta = fromList []}) +[Header 1 ("",[],[]) [Str "Body",Space,Str "title"] +,Div ("",["section"],[]) + [Header 2 ("",[],[]) [Str "Section",Space,Str "title"] + ,Div ("",["section"],[]) + [Header 3 ("",[],[]) [Str "Subsection",Space,Str "title",LineBreak,Str "with",Space,Str "multiple",Space,Str "paragraphs"]] + ,Div ("",["section"],[]) + [Header 3 ("",[],[]) [Str "Another",Space,Str "subsection",Space,Str "title"]]]] |