Resolving conflict in issue #582

This commit is contained in:
Gasu16 2021-11-22 17:51:19 +01:00 committed by Wei Zhang
parent f81c3b19d7
commit 0d8743cd87
2 changed files with 19 additions and 2 deletions

View file

@ -120,8 +120,8 @@ pub fn build() -> App<'static, 'static> {
Arg::with_name("directory-only")
.short("d")
.long("directory-only")
.conflicts_with("all")
.conflicts_with("almost-all")
//.conflicts_with("all")
//.conflicts_with("almost-all")
.conflicts_with("depth")
.conflicts_with("recursive")
.help("Display directories themselves, and not their contents (recursively when used with --tree)"),

View file

@ -632,3 +632,20 @@ fn test_date_custom_format_supports_padding() {
.count(2),
);
}
#[test]
fn test_all_directory() {
let dir = tempdir();
dir.child("one").touch().unwrap();
dir.child("two").touch().unwrap();
cmd()
.arg("-a")
.arg("-d")
.arg(dir.path())
.assert()
.stdout(
predicate::str::is_match(".\n..\none\ntwo\n")
.unwrap(),
);
}