Skip to content

Commit

Permalink
test to check show_dir_name properly quotes name
Browse files Browse the repository at this point in the history
  • Loading branch information
matrixhead committed Jul 9, 2024
1 parent 35e66d3 commit 98e4dda
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4950,3 +4950,18 @@ fn test_ls_color_clear_to_eol() {
// cspell:disable-next-line
result.stdout_contains("\x1b[0m\x1b[31;42mzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.foo\x1b[0m\x1b[K");
}

#[test]
fn test_ls_quotes_dirname_when_a_column_exists() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
//create a folder with a column in it.
at.mkdir("dir:name");
at.touch("dir:name/file1");
scene
.ucmd()
.arg("-R")
.arg("--quoting=shell-escape")
.succeeds()
.stdout_contains("'./dir:name'");
}

0 comments on commit 98e4dda

Please sign in to comment.