Pass the path to the ui builder function when creating a mock application

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-10-26 15:00:09 +02:00
parent 26b05b4bb9
commit e331b9efb3

View file

@ -45,6 +45,7 @@ macro_rules! make_mock_app {
modulename $module:ident; modulename $module:ident;
version $version:expr; version $version:expr;
with help $help:expr; with help $help:expr;
with ui builder function $buildui:path;
}=> { }=> {
mod $module { mod $module {
use clap::{App, ArgMatches}; use clap::{App, ArgMatches};
@ -64,7 +65,7 @@ macro_rules! make_mock_app {
fn new(args: Vec<&'static str>) -> Self { fn new(args: Vec<&'static str>) -> Self {
MockLinkApp { MockLinkApp {
args: args, args: args,
inner: ::build_ui(Runtime::get_default_cli_builder($appname, $version, $help)), inner: ($buildui)(Runtime::get_default_cli_builder($appname, $version, $help)),
} }
} }
} }