mirror of
https://github.com/NerdyPepper/eva
synced 2024-07-08 19:45:52 +00:00
Don't parse arguments during cargo test
(#37)
Otherwise, running the tests with special arguments (e.g. `cargo test -- --test-threads 1`) will break.
This commit is contained in:
parent
ee833337df
commit
ff3ac137ed
11
src/main.rs
11
src/main.rs
|
@ -36,10 +36,21 @@ struct Configuration {
|
|||
input: String,
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
lazy_static! {
|
||||
static ref CONFIGURATION: Configuration = parse_arguments();
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
lazy_static! {
|
||||
static ref CONFIGURATION: Configuration = Configuration {
|
||||
radian_mode: false,
|
||||
fix: 10,
|
||||
base: 10,
|
||||
input: "".to_string(),
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
if !CONFIGURATION.input.is_empty() {
|
||||
// command mode //
|
||||
|
|
Loading…
Reference in New Issue
Block a user