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
Cargo.lock
generated
1
Cargo.lock
generated
@@ -1258,6 +1258,7 @@ dependencies = [
|
||||
"atty",
|
||||
"bindgen",
|
||||
"c_fixed_string",
|
||||
"cfg-if 1.0.0",
|
||||
"chrono",
|
||||
"cmake",
|
||||
"dateparser",
|
||||
|
||||
@@ -8,6 +8,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
atty = "0.2"
|
||||
c_fixed_string = { version = "0.2", optional = true }
|
||||
cfg-if = "1"
|
||||
chrono = "0.4"
|
||||
dateparser = "0.1.6"
|
||||
derive_more = "0.99"
|
||||
|
||||
@@ -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