mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-11 07:10:56 +00:00
Merge pull request #49 from killercup/feature/group-is-useless-without-long
Add "`--group` is useless without `--long`"
This commit is contained in:
commit
860e19d292
@ -288,6 +288,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"))
|
||||
}
|
||||
@ -638,6 +641,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