tests: Fix test broken in prev commit

This commit is contained in:
andy.boot
2024-06-18 23:34:33 +01:00
parent 5f76db27c9
commit cab250aa0e
2 changed files with 4 additions and 6 deletions
+1 -3
View File
@@ -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")
+3 -3
View File
@@ -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]