From fb8db95578a8d2c88f9f902bd1b1f266754007a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Dec 2017 02:22:33 +0100 Subject: [PATCH] m.components: initial test. --- pelican-plugins/m/test/components/page.html | 85 +++++++++++++++++++++ pelican-plugins/m/test/components/page.rst | 76 ++++++++++++++++++ pelican-plugins/m/test/test_components.py | 12 +++ 3 files changed, 173 insertions(+) create mode 100644 pelican-plugins/m/test/components/page.html create mode 100644 pelican-plugins/m/test/components/page.rst create mode 100644 pelican-plugins/m/test/test_components.py 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')) -- 2.30.2