diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py index 1080160be..c07391e75 100644 --- a/mesonbuild/modules/hotdoc.py +++ b/mesonbuild/modules/hotdoc.py @@ -379,7 +379,7 @@ class HotDocModule(ExtensionModule): @noKwargs def has_extensions(self, state, args, kwargs): - res = self.hotdoc.run_hotdoc(['--has-extension'] + args) == 0 + res = self.hotdoc.run_hotdoc(['--has-extension=%s' % extension for extension in args]) == 0 return ModuleReturnValue(res, [res]) def generate_doc(self, state, args, kwargs): diff --git a/test cases/frameworks/23 hotdoc/meson.build b/test cases/frameworks/23 hotdoc/meson.build index 191569dd6..dd3c92acd 100644 --- a/test cases/frameworks/23 hotdoc/meson.build +++ b/test cases/frameworks/23 hotdoc/meson.build @@ -7,3 +7,9 @@ endif subdir('doc') +assert(hotdoc.has_extensions(['gi-extension']) == true, + 'GI extension should always be found.') + +assert(hotdoc.has_extensions(['gi-extension', 'no-way-you-exist-extension']) == false, + 'A hotdoc extension called "no-way-you-exist-extension" should never be found.') +