Enable verbose for test

This commit is contained in:
2022-06-25 01:45:15 +00:00
committed by GitHub
parent 5bba7d2c2e
commit 12c01ccb95
4 changed files with 16 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
#[macro_use]
extern crate cfg_if;
#[macro_use]
extern crate lazy_static;
#[cfg(all(feature = "link-cplusplus", target_env = "gnu"))]
extern crate link_cplusplus;

View File

@@ -568,7 +568,17 @@ pub fn parse_cmd() -> Option<CommandOpts> {
}
impl Default for CommandOpts {
fn default() -> Self {
Self::new(Command::None)
cfg_if! {
if #[cfg(test)] {
fn default() -> Self {
let mut re = Self::new(Command::None);
re.verbose = true;
re
}
} else {
fn default() -> Self {
Self::new(Command::None)
}
}
}
}