mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-13 21:52:37 +00:00
Resolving conflict in issue #582
This commit is contained in:
parent
f81c3b19d7
commit
0d8743cd87
2 changed files with 19 additions and 2 deletions
|
@ -120,8 +120,8 @@ pub fn build() -> App<'static, 'static> {
|
||||||
Arg::with_name("directory-only")
|
Arg::with_name("directory-only")
|
||||||
.short("d")
|
.short("d")
|
||||||
.long("directory-only")
|
.long("directory-only")
|
||||||
.conflicts_with("all")
|
//.conflicts_with("all")
|
||||||
.conflicts_with("almost-all")
|
//.conflicts_with("almost-all")
|
||||||
.conflicts_with("depth")
|
.conflicts_with("depth")
|
||||||
.conflicts_with("recursive")
|
.conflicts_with("recursive")
|
||||||
.help("Display directories themselves, and not their contents (recursively when used with --tree)"),
|
.help("Display directories themselves, and not their contents (recursively when used with --tree)"),
|
||||||
|
|
|
@ -632,3 +632,20 @@ fn test_date_custom_format_supports_padding() {
|
||||||
.count(2),
|
.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(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue