From 301df388162153873e21a2732a9f735d1dcba022 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 13 Nov 2018 21:44:25 -0300 Subject: [PATCH] hotdoc: Fix has_extensions when several extensions are passed in --- mesonbuild/modules/hotdoc.py | 2 +- test cases/frameworks/23 hotdoc/meson.build | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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.') +