mirror of
https://github.com/lsd-rs/lsd.git
synced 2026-02-15 03:34:49 +02:00
Resolving conflict in issue #582
This commit is contained in:
@@ -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)"),
|
||||
|
||||
@@ -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(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user