mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-07-08 01:32:41 +08:00
Enable verbose for test
This commit is contained in:
@@ -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;
|
||||
|
||||
14
src/opts.rs
14
src/opts.rs
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user