summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-prolog
diff options
context:
space:
mode:
Diffstat (limited to 'tests/roots/test-prolog')
-rw-r--r--tests/roots/test-prolog/conf.py10
-rw-r--r--tests/roots/test-prolog/index.rst7
-rw-r--r--tests/roots/test-prolog/markdown.md3
-rw-r--r--tests/roots/test-prolog/prolog_markdown_parser.py13
-rw-r--r--tests/roots/test-prolog/restructuredtext.rst4
5 files changed, 37 insertions, 0 deletions
diff --git a/tests/roots/test-prolog/conf.py b/tests/roots/test-prolog/conf.py
new file mode 100644
index 0000000..f6be09c
--- /dev/null
+++ b/tests/roots/test-prolog/conf.py
@@ -0,0 +1,10 @@
+import os
+import sys
+
+sys.path.insert(0, os.path.abspath('.'))
+
+
+extensions = ['prolog_markdown_parser']
+
+rst_prolog = '*Hello world*.\n\n'
+rst_epilog = '\n\n*Good-bye world*.'
diff --git a/tests/roots/test-prolog/index.rst b/tests/roots/test-prolog/index.rst
new file mode 100644
index 0000000..2178d73
--- /dev/null
+++ b/tests/roots/test-prolog/index.rst
@@ -0,0 +1,7 @@
+prolog and epilog
+=================
+
+.. toctree::
+
+ restructuredtext
+ markdown
diff --git a/tests/roots/test-prolog/markdown.md b/tests/roots/test-prolog/markdown.md
new file mode 100644
index 0000000..e400720
--- /dev/null
+++ b/tests/roots/test-prolog/markdown.md
@@ -0,0 +1,3 @@
+# sample document
+
+This is a sample document in markdown
diff --git a/tests/roots/test-prolog/prolog_markdown_parser.py b/tests/roots/test-prolog/prolog_markdown_parser.py
new file mode 100644
index 0000000..f8d787c
--- /dev/null
+++ b/tests/roots/test-prolog/prolog_markdown_parser.py
@@ -0,0 +1,13 @@
+from docutils.parsers import Parser
+
+
+class DummyMarkdownParser(Parser):
+ supported = ('markdown',)
+
+ def parse(self, inputstring, document):
+ document.rawsource = inputstring
+
+
+def setup(app):
+ app.add_source_suffix('.md', 'markdown')
+ app.add_source_parser(DummyMarkdownParser)
diff --git a/tests/roots/test-prolog/restructuredtext.rst b/tests/roots/test-prolog/restructuredtext.rst
new file mode 100644
index 0000000..f1fafb6
--- /dev/null
+++ b/tests/roots/test-prolog/restructuredtext.rst
@@ -0,0 +1,4 @@
+sample document
+===============
+
+This is a sample document in reST