doc: Add missing modules to dropdown list

pull/8894/head
Xavier Claessens 3 years ago committed by Daniel Mensinger
parent b6d754a40c
commit fbeb62101c
  1. 6
      docs/theme/extra/templates/navbar_links.html
  2. 16
      run_unittests.py

@ -13,6 +13,7 @@
("Fs-module.html","Filesystem"), \
("Gnome-module.html","GNOME"), \
("Hotdoc-module.html","Hotdoc"), \
("i18n-module.html","i18n"), \
("Icestorm-module.html","Icestorm"), \
("Keyval-module.html","Keyval"), \
("Pkgconfig-module.html","Pkgconfig"), \
@ -20,11 +21,12 @@
("Python-module.html","Python"), \
("Qt4-module.html","Qt4"), \
("Qt5-module.html","Qt5"), \
("Qt6-module.html","Qt6"), \
("RPM-module.html","RPM"), \
("Rust-module.html","Rust"), \
("Simd-module.html","Simd"), \
("SourceSet-module.html","SourceSet"), \
("Windows-module.html","Windows"), \
("i18n-module.html","i18n")]:
("Windows-module.html","Windows")]:
<li>
<a href="@tup[0]">@tup[1]</a>
</li>

@ -1849,6 +1849,22 @@ class DataTests(unittest.TestCase):
if f not in exceptions and not f.startswith('_include'):
self.assertIn(f, toc)
def test_modules_in_navbar(self):
'''
Test that each module is referenced in navbar_links.html
'''
with open("docs/theme/extra/templates/navbar_links.html", encoding='utf-8') as f:
html = f.read().lower()
self.assertIsNotNone(html)
for f in Path('mesonbuild/modules').glob('*.py'):
if f.name in {'modtest.py', 'qt.py', '__init__.py'}:
continue
name = f'{f.stem}-module.html'
name = name.replace('unstable_', '')
name = name.replace('python3', 'python-3')
name = name.replace('_', '-')
self.assertIn(name, html)
def test_vim_syntax_highlighting(self):
'''
Ensure that vim syntax highlighting files were updated for new

Loading…
Cancel
Save