1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

ls: fix double quoting when color is enabled

When color was enabled the escape_name function was called twice which led to names like `hello world` being displayed as `"'hello world'".
This commit is contained in:
Terts Diepraam 2022-06-02 23:44:18 +02:00
parent 68cc9312c8
commit 626ed43e05
2 changed files with 27 additions and 18 deletions

View file

@ -2324,6 +2324,20 @@ fn test_ls_quoting_style() {
}
}
#[test]
fn test_ls_quoting_and_color() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.touch("one two");
scene
.ucmd()
.arg("--color")
.arg("one two")
.succeeds()
.stdout_only("'one two'\n");
}
#[test]
fn test_ls_ignore_hide() {
let scene = TestScenario::new(util_name!());