Skip to content

Commit

Permalink
tests: Fix test broken in prev commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bootandy committed Jun 18, 2024
1 parent 5f76db2 commit cab250a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions tests/test_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit cab250a

Please sign in to comment.