summaryrefslogtreecommitdiff
path: root/tests/test_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_plugin.py')
-rw-r--r--tests/test_plugin.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_plugin.py b/tests/test_plugin.py
new file mode 100644
index 0000000..c9333f7
--- /dev/null
+++ b/tests/test_plugin.py
@@ -0,0 +1,18 @@
+
+
+from asciidoc.message import Message
+from asciidoc.plugin import Plugin
+
+from .utils import Struct, TEST_DIR
+
+PLUGIN_DIR = TEST_DIR / 'plugin'
+CONFIG = Struct(get_load_dirs=lambda: [str(PLUGIN_DIR)], verbose=True)
+
+
+def test_plugin_list(capsys) -> None:
+ plugin = Plugin('backend', Message(None, None, CONFIG, None), CONFIG)
+ plugin.list([])
+ captured = capsys.readouterr()
+ backend_dir = PLUGIN_DIR / 'backends'
+ assert captured.out == "{}\n{}\n".format(backend_dir / 'bar', backend_dir / 'foo')
+ assert captured.err == ''