Skip to content

Commit

Permalink
Git Column is Useless Without --long
Browse files Browse the repository at this point in the history
  • Loading branch information
killercup committed Mar 10, 2015
1 parent 7dc3a02 commit 5d152db
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/options.rs
Expand Up @@ -279,6 +279,9 @@ impl View {
else if matches.opt_present("blocks") {
Err(Misfire::Useless("blocks", false, "long"))
}
else if cfg!(feature="git") && matches.opt_present("git") {
Err(Misfire::Useless("git", false, "long"))
}
else if matches.opt_present("time") {
Err(Misfire::Useless("time", false, "long"))
}
Expand Down Expand Up @@ -653,6 +656,13 @@ mod test {
assert_eq!(opts.unwrap_err(), Misfire::Useless("blocks", false, "long"))
}

#[test]
#[cfg(feature="git")]
fn just_git() {
let opts = Options::getopts(&[ "--git".to_string() ]);
assert_eq!(opts.unwrap_err(), Misfire::Useless("git", false, "long"))
}

#[test]
fn extended_without_long() {
if xattr::feature_implemented() {
Expand Down

0 comments on commit 5d152db

Please sign in to comment.