From 0d8743cd87eb026c7632a76d96ad3952f7c3867d Mon Sep 17 00:00:00 2001 From: Gasu16 Date: Mon, 22 Nov 2021 17:51:19 +0100 Subject: [PATCH] Resolving conflict in issue #582 --- src/app.rs | 4 ++-- tests/integration.rs | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index 2be7ade..d7d1a26 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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)"), diff --git a/tests/integration.rs b/tests/integration.rs index 574768a..38d4ce9 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -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(), + ); +}