Skip to content

Commit

Permalink
ls --dired -R: add a long file name and fix a windows test
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre committed Sep 30, 2023
1 parent 72e9aaa commit 5e7fd55
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3562,6 +3562,7 @@ fn test_ls_dired_recursive_multiple() {
at.touch("d/d2/a");
at.touch("d/d2/c2");
at.touch("d/d1/f1");
at.touch("d/d1/file-long");
let mut cmd = scene.ucmd();

cmd.arg("--dired").arg("-l").arg("-R").arg("d");
Expand Down Expand Up @@ -3599,14 +3600,7 @@ fn test_ls_dired_recursive_multiple() {
.collect();

println!("Extracted filenames: {:?}", filenames);
assert_eq!(filenames, vec!["d1", "d2", "f1", "a", "c2"]);

/* .stdout_contains(" d/d1:")
.stdout_contains(" d/d2:")
.stdout_contains(" total 0")
.stdout_contains("//DIRED//")
.stdout_contains("//SUBDIRED// 2 3")
.stdout_contains("//DIRED-OPTIONS// --quoting-style");*/
assert_eq!(filenames, vec!["d1", "d2", "f1", "file-long", "a", "c2"]);
}

#[test]
Expand Down Expand Up @@ -3754,5 +3748,8 @@ fn test_ls_subdired_complex() {
.collect();

println!("Extracted dirnames: {:?}", dirnames);
#[cfg(unix)]
assert_eq!(dirnames, vec!["dir1", "dir1/c2", "dir1/d"]);
#[cfg(windows)]
assert_eq!(dirnames, vec!["dir1", "dir1\\c2", "dir1\\d"]);

Check warning on line 3754 in tests/by-util/test_ls.rs

View check run for this annotation

Codecov / codecov/patch

tests/by-util/test_ls.rs#L3754

Added line #L3754 was not covered by tests
}

0 comments on commit 5e7fd55

Please sign in to comment.