mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-16 09:17:09 +00:00
"--group
is useless without --long
"
This commit is contained in:
parent
cf38f90aa9
commit
a4459da6ad
@ -281,6 +281,9 @@ impl View {
|
||||
else if matches.opt_present("tree") {
|
||||
Err(Misfire::Useless("tree", false, "long"))
|
||||
}
|
||||
else if matches.opt_present("group") {
|
||||
Err(Misfire::Useless("group", false, "long"))
|
||||
}
|
||||
else if matches.opt_present("level") && !matches.opt_present("recurse") {
|
||||
Err(Misfire::Useless2("level", "recurse", "tree"))
|
||||
}
|
||||
@ -629,6 +632,12 @@ mod test {
|
||||
assert_eq!(opts.unwrap_err(), Misfire::Useless("header", false, "long"))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn just_group() {
|
||||
let opts = Options::getopts(&[ "--group".to_string() ]);
|
||||
assert_eq!(opts.unwrap_err(), Misfire::Useless("group", false, "long"))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn just_inode() {
|
||||
let opts = Options::getopts(&[ "--inode".to_string() ]);
|
||||
|
Loading…
Reference in New Issue
Block a user