From 9ab39667c5df2cff44d5c239b768b8a3302d6534 Mon Sep 17 00:00:00 2001 From: "andy.boot" Date: Tue, 18 Jun 2024 23:34:33 +0100 Subject: [PATCH] tests: Fix test broken in prev commit --- src/config.rs | 4 +--- tests/test_flags.rs | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/config.rs b/src/config.rs index 5bbe8c69..7fa23472 100644 --- a/src/config.rs +++ b/src/config.rs @@ -52,9 +52,7 @@ impl Config { Some(true) == self.ignore_hidden || options.get_flag("ignore_hidden") } pub fn get_full_paths(&self, options: &ArgMatches) -> bool { - Some(true) == self.display_full_paths - || options.get_flag("display_full_paths") - // || self.get_only_file(options) + Some(true) == self.display_full_paths || options.get_flag("display_full_paths") } pub fn get_reverse(&self, options: &ArgMatches) -> bool { Some(true) == self.reverse || options.get_flag("reverse") diff --git a/tests/test_flags.rs b/tests/test_flags.rs index 51e40681..ed3a8235 100644 --- a/tests/test_flags.rs +++ b/tests/test_flags.rs @@ -139,9 +139,9 @@ pub fn test_show_files_by_type() { #[cfg(target_family = "unix")] pub fn test_show_files_only() { let output = build_command(vec!["-c", "-F", "tests/test_dir"]); - assert!(output.contains("tests/test_dir/many/a_file")); - assert!(output.contains("tests/test_dir/many/hello_file")); - assert!(!output.contains("tests/test_dir/many ")); + assert!(output.contains("a_file")); + assert!(output.contains("hello_file")); + assert!(!output.contains("many")); } #[test]