aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorChristoph Behle <behlec@gmail.com>2018-07-05 21:18:38 +0200
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-07-08 10:56:37 -0700
commit2428b388db6eab8d450b1daee20c4cdb0bb88a65 (patch)
treecebde61a6f49ccd0ff8fa8fa64a235bbffb83c0a /run_unittests.py
parent2093d45a4e1203d868d200628918472877c7ec31 (diff)
downloadmeson-2428b388db6eab8d450b1daee20c4cdb0bb88a65.zip
meson-2428b388db6eab8d450b1daee20c4cdb0bb88a65.tar.gz
meson-2428b388db6eab8d450b1daee20c4cdb0bb88a65.tar.bz2
Document options for meson
Document what waring_level 1,2,3 means. Test if markdown files are in sitemap Add Builtin-options.md to sitemap.txt Builtin-options.md: Fix tables in Builtin-options.md Add documentation for warning options Added more options to doc General documentation: Add link to Builtin-options Remove obsolete file Testing: Add function test_markdown_files_in_sitemap. Checks if each markdown file is contained in sitemap.txt
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index b3bc271..ed69572 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2271,6 +2271,21 @@ recommended as it is not supported on some platforms''')
arches = set(arches[1:])
self.assertEqual(arches, set(mesonbuild.environment.known_cpu_families))
+ @unittest.skipIf(not os.path.isdir('docs'), 'Doc dir not found, presumably because this is a tarball release.')
+ def test_markdown_files_in_sitemap(self):
+ '''
+ Test that each markdown files in docs/markdown is referenced in sitemap.txt
+ '''
+ with open("docs/sitemap.txt") as f:
+ md = f.read()
+ self.assertIsNotNone(md)
+ toc = list(m.group(1) for m in re.finditer(r"^\s*(\w.*)$", md, re.MULTILINE))
+ markdownfiles = [f.name for f in Path("docs/markdown").iterdir() if f.is_file() and f.suffix == '.md']
+ exceptions = ['_Sidebar.md']
+ for f in markdownfiles:
+ if f not in exceptions:
+ self.assertIn(f, toc)
+
def test_feature_check_usage_subprojects(self):
testdir = os.path.join(self.unit_test_dir, '34 featurenew subprojects')
out = self.init(testdir)