aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-22 18:47:42 +0100
committerDavid Robillard <d@drobilla.net>2020-04-10 19:46:04 +0200
commit9feb282e932a0da077c4f742ed58ae001b83f7e1 (patch)
treed047460a904b07ae154e59f320d17722a7ab227e
parentf6ba13d878eeb6bb78914002ef89c63286ccd2e4 (diff)
downloadlv2-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--wscript10
1 files changed, 10 insertions, 0 deletions
diff --git a/wscript b/wscript
index d67efb2..fa45db5 100644
--- a/wscript
+++ b/wscript
@@ -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