all: add clap test asserts (#1452)

This commit is contained in:
Jon Häggblad
2022-07-08 21:04:09 +02:00
committed by GitHub
parent 7aa34391fb
commit c41a600bcb
4 changed files with 47 additions and 0 deletions
+11
View File
@@ -152,3 +152,14 @@ pub(crate) fn override_config(mut config: Config, args: OverrideConfig) -> Confi
config
}
#[cfg(test)]
mod tests {
use super::*;
use clap::CommandFactory;
#[test]
fn verify_cli() {
Cli::command().debug_assert();
}
}
+11
View File
@@ -147,3 +147,14 @@ pub(crate) fn override_config(mut config: Config, args: OverrideConfig) -> Confi
config
}
#[cfg(test)]
mod tests {
use super::*;
use clap::CommandFactory;
#[test]
fn verify_cli() {
Cli::command().debug_assert();
}
}
+14
View File
@@ -107,3 +107,17 @@ fn setup_logging() {
.filter_module("tokio_tungstenite", log::LevelFilter::Warn)
.init();
}
#[cfg(test)]
mod tests {
use super::*;
use clap::CommandFactory;
#[test]
fn verify_cli() {
LONG_VERSION
.set(long_version())
.expect("Failed to set long about text");
Cli::command().debug_assert();
}
}
+11
View File
@@ -106,3 +106,14 @@ fn setup_logging() {
.filter_module("want", log::LevelFilter::Warn)
.init();
}
#[cfg(test)]
mod tests {
use super::*;
use clap::CommandFactory;
#[test]
fn verify_cli() {
Cli::command().debug_assert();
}
}