From 26e3abc6b1f7ad5a390ebe72b34be09705921480 Mon Sep 17 00:00:00 2001 From: Ben S Date: Sun, 28 Jun 2015 20:41:38 +0100 Subject: [PATCH] Re-add missing failing option combinations --- src/options.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/options.rs b/src/options.rs index 092b6ab..b290675 100644 --- a/src/options.rs +++ b/src/options.rs @@ -288,6 +288,12 @@ impl View { if cfg!(feature="git") && matches.opt_present("git") { Err(Useless("git", false, "long")) } + else if matches.opt_present("level") && !matches.opt_present("recurse") { + Err(Useless2("level", "recurse", "tree")) + } + else if Attribute::feature_implemented() && matches.opt_present("extended") { + Err(Useless("extended", false, "long")) + } else { Ok(()) } @@ -721,5 +727,4 @@ mod test { let opts = Options::getopts(&[ "--level".to_string(), "69105".to_string() ]); assert_eq!(opts.unwrap_err(), Misfire::Useless2("level", "recurse", "tree")) } - }