mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
ls: add tests for --hide-control-chars
This commit is contained in:
parent
9cb0fc2945
commit
54e9cb09da
1 changed files with 18 additions and 0 deletions
|
@ -1162,6 +1162,24 @@ fn test_ls_quoting_style() {
|
|||
assert_eq!(result.stdout, format!("{}\n", correct));
|
||||
}
|
||||
|
||||
for (arg, correct) in &[
|
||||
("--quoting-style=literal", "one?two"),
|
||||
("-N", "one?two"),
|
||||
("--literal", "one?two"),
|
||||
("--quoting-style=shell", "one?two"),
|
||||
("--quoting-style=shell-always", "'one?two'"),
|
||||
] {
|
||||
let result = scene
|
||||
.ucmd()
|
||||
.arg(arg)
|
||||
.arg("--hide-control-chars")
|
||||
.arg("one\ntwo")
|
||||
.run();
|
||||
println!("stderr = {:?}", result.stderr);
|
||||
println!("stdout = {:?}", result.stdout);
|
||||
assert_eq!(result.stdout, format!("{}\n", correct));
|
||||
}
|
||||
|
||||
for (arg, correct) in &[
|
||||
("--quoting-style=literal", "one\ntwo"),
|
||||
("-N", "one\ntwo"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue