23 lines
503 B
Rust
23 lines
503 B
Rust
//! Unit tests of this module (moved out of the file by STRA-338; the test ids are unchanged).
|
|
|
|
use super::*;
|
|
|
|
fn strings(items: &[&str]) -> Vec<String> {
|
|
items.iter().map(|s| s.to_string()).collect()
|
|
}
|
|
|
|
fn parse_as(root: bool, args: &[&str]) -> Result<Command, String> {
|
|
let var = |_: &str| None;
|
|
parse(
|
|
&strings(args),
|
|
&Environment {
|
|
root,
|
|
home: Some("/home/para".into()),
|
|
var: &var,
|
|
},
|
|
)
|
|
}
|
|
|
|
mod flags;
|
|
mod reconfigure_args;
|