From e331b9efb3348a227b274570924c1871df8ab111 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 26 Oct 2019 15:00:09 +0200 Subject: [PATCH] Pass the path to the ui builder function when creating a mock application Signed-off-by: Matthias Beyer --- lib/etc/libimagutil/src/testing.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/etc/libimagutil/src/testing.rs b/lib/etc/libimagutil/src/testing.rs index beab21a6..feee2a11 100644 --- a/lib/etc/libimagutil/src/testing.rs +++ b/lib/etc/libimagutil/src/testing.rs @@ -45,6 +45,7 @@ macro_rules! make_mock_app { modulename $module:ident; version $version:expr; with help $help:expr; + with ui builder function $buildui:path; }=> { mod $module { use clap::{App, ArgMatches}; @@ -64,7 +65,7 @@ macro_rules! make_mock_app { fn new(args: Vec<&'static str>) -> Self { MockLinkApp { args: args, - inner: ::build_ui(Runtime::get_default_cli_builder($appname, $version, $help)), + inner: ($buildui)(Runtime::get_default_cli_builder($appname, $version, $help)), } } }