diff options
author | David Robillard <d@drobilla.net> | 2020-03-22 18:47:42 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-04-10 19:46:04 +0200 |
commit | 9feb282e932a0da077c4f742ed58ae001b83f7e1 (patch) | |
tree | d047460a904b07ae154e59f320d17722a7ab227e | |
parent | f6ba13d878eeb6bb78914002ef89c63286ccd2e4 (diff) | |
download | lv2-9feb282e932a0da077c4f742ed58ae001b83f7e1.tar.xz |
Add test that documentation is properly formatted Markdown
The leading and trailing blank line requirement is just to ease editing and
maintenance, for example so that naive tools can wrap paragraphs.
-rw-r--r-- | wscript | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -500,6 +500,16 @@ def test_vocabularies(check, specs, files): check(lambda: comment == comment.strip(), name = "%s comment has stripped whitespace" % subject) + # Check that lv2:documentation, if present, is proper Markdown + documentation = model.value(subject, lv2.documentation, None) + if documentation is not None: + check(lambda: documentation.datatype == lv2.Markdown, + name = "%s documentation is explicitly Markdown" % subject) + check(lambda: str(documentation).startswith('\n\n'), + name = "%s documentation starts with blank line" % subject) + check(lambda: str(documentation).endswith('\n\n'), + name = "%s documentation ends with blank line" % subject) + def test(tst): import tempfile |