aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Old.hs2
-rw-r--r--test/docbook-chapter.docbook30
-rw-r--r--test/docbook-chapter.native17
3 files changed, 49 insertions, 0 deletions
diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs
index d0a1e0e4f..45e40a830 100644
--- a/test/Tests/Old.hs
+++ b/test/Tests/Old.hs
@@ -86,6 +86,8 @@ tests pandocPath =
, test' "reader" ["-r", "docbook", "-w", "native", "-s"]
"docbook-reader.docbook" "docbook-reader.native"
, test' "reader" ["-r", "docbook", "-w", "native", "-s"]
+ "docbook-chapter.docbook" "docbook-chapter.native"
+ , test' "reader" ["-r", "docbook", "-w", "native", "-s"]
"docbook-xref.docbook" "docbook-xref.native"
]
, testGroup "docbook5"
diff --git a/test/docbook-chapter.docbook b/test/docbook-chapter.docbook
new file mode 100644
index 000000000..68bb60e02
--- /dev/null
+++ b/test/docbook-chapter.docbook
@@ -0,0 +1,30 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<!-- This matches the example from
+https://tdg.docbook.org/tdg/4.5/section.html, sans sectioninfo and subtitle, as
+they're currently not supported -->
+<chapter><title>Test Chapter</title>
+<para>This chapter uses recursive sections.</para>
+<section>
+<title>Like a Sect1</title>
+<para>This section is like a Sect1.</para>
+<section><title>Like a Sect2</title>
+<para>This section is like a Sect2.</para>
+<section><title>Like a Sect3</title>
+<para>This section is like a Sect3.</para>
+<section><title>Like a Sect4</title>
+<para>This section is like a Sect4.</para>
+<section><title>Like a Sect5</title>
+<para>This section is like a Sect5.</para>
+<section><title>Would be like a Sect6</title>
+<para>This section would be like a Sect6, if there was one.</para>
+<section><title>Would be like a Sect7</title>
+<para>This section would be like a Sect7, if there was one.</para>
+</section>
+</section>
+</section>
+</section>
+</section>
+</section>
+</section>
+</chapter>
diff --git a/test/docbook-chapter.native b/test/docbook-chapter.native
new file mode 100644
index 000000000..396b6a21a
--- /dev/null
+++ b/test/docbook-chapter.native
@@ -0,0 +1,17 @@
+Pandoc (Meta {unMeta = fromList []})
+[Header 1 ("",[],[]) [Str "Test",Space,Str "Chapter"]
+,Para [Str "This",Space,Str "chapter",Space,Str "uses",Space,Str "recursive",Space,Str "sections."]
+,Header 2 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect1"]
+,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect1."]
+,Header 3 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect2"]
+,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect2."]
+,Header 4 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect3"]
+,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect3."]
+,Header 5 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect4"]
+,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect4."]
+,Header 6 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect5"]
+,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect5."]
+,Header 7 ("",[],[]) [Str "Would",Space,Str "be",Space,Str "like",Space,Str "a",Space,Str "Sect6"]
+,Para [Str "This",Space,Str "section",Space,Str "would",Space,Str "be",Space,Str "like",Space,Str "a",Space,Str "Sect6,",Space,Str "if",Space,Str "there",Space,Str "was",Space,Str "one."]
+,Header 8 ("",[],[]) [Str "Would",Space,Str "be",Space,Str "like",Space,Str "a",Space,Str "Sect7"]
+,Para [Str "This",Space,Str "section",Space,Str "would",Space,Str "be",Space,Str "like",Space,Str "a",Space,Str "Sect7,",Space,Str "if",Space,Str "there",Space,Str "was",Space,Str "one."]]