From: Vladimír Vondruš Date: Mon, 11 Dec 2017 01:22:33 +0000 (+0100) Subject: m.components: initial test. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=fb8db95578a8d2c88f9f902bd1b1f266754007a2;p=blog.git m.components: initial test. --- diff --git a/pelican-plugins/m/test/components/page.html b/pelican-plugins/m/test/components/page.html new file mode 100644 index 00000000..c1359bc2 --- /dev/null +++ b/pelican-plugins/m/test/components/page.html @@ -0,0 +1,85 @@ + + + + + m.components | A Pelican Blog + + + + + + + + + + + + + +
+
+
+
+
+
+

m.components

+ + + + + + + + +
+
Some
+    code
+snippet
+

And a resulting output.

+
+
+
Console
+

And text.

+
+
+Dim text.
+

~ ~ ~

+Button text. +
+First text.
+
+Second text.
+
+ +
+
+
+
+
+ + diff --git a/pelican-plugins/m/test/components/page.rst b/pelican-plugins/m/test/components/page.rst new file mode 100644 index 00000000..6ea0b308 --- /dev/null +++ b/pelican-plugins/m/test/components/page.rst @@ -0,0 +1,76 @@ +m.components +############ + +:summary: no. + +.. block-default:: Default block + + Text. + +.. block-success:: Success block + :class: m-text-right + + First paragraph, aligned to the right. + + *Second* paragraph, also. + +.. note-default:: Default note + + Text. + +.. note-danger:: Danger note + + First paragraph. + + *Second* paragraph. + +.. note-warning:: + :class: m-text-center + + Warning note without title, centered. + +.. frame:: Frame with title + + Text. + +.. frame:: + :class: m-text-left + + Frame *without* title, on the left. + +.. code-figure:: + :class: m-flat + + :: + + Some + code + snippet + + And a resulting output. + +.. console-figure:: + + .. class:: m-console + + :: + + Console + + And text. + +.. text-dim:: + + Dim text. + +.. transition:: ~ ~ ~ + +.. button-warning:: {filename}/page.rst + + Button text. + +.. button-success:: # + + First text. + + Second text. diff --git a/pelican-plugins/m/test/test_components.py b/pelican-plugins/m/test/test_components.py new file mode 100644 index 00000000..504f248c --- /dev/null +++ b/pelican-plugins/m/test/test_components.py @@ -0,0 +1,12 @@ +from m.test import PluginTestCase + +class Components(PluginTestCase): + def __init__(self, *args, **kwargs): + super().__init__(__file__, '', *args, **kwargs) + + def test(self): + self.run_pelican({ + 'PLUGINS': ['m.htmlsanity', 'm.components'] + }) + + self.assertEqual(*self.actual_expected_contents('page.html'))