From 9feb282e932a0da077c4f742ed58ae001b83f7e1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 22 Mar 2020 18:47:42 +0100 Subject: 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. --- wscript | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'wscript') 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 -- cgit v1.2.1