mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
address review comments
This commit is contained in:
parent
268b180416
commit
e071286eb0
3 changed files with 3 additions and 18 deletions
|
@ -289,7 +289,6 @@ indicatif = "0.17"
|
|||
itertools = "0.12.0"
|
||||
libc = "0.2.150"
|
||||
lscolors = { version = "0.16.0", default-features = false, features = [
|
||||
"nu-ansi-term",
|
||||
"gnu_legacy",
|
||||
] }
|
||||
memchr = "2"
|
||||
|
|
|
@ -22,7 +22,7 @@ number_prefix = { workspace = true }
|
|||
uutils_term_grid = { workspace = true }
|
||||
terminal_size = { workspace = true }
|
||||
glob = { workspace = true }
|
||||
lscolors = { workspace = true, features = ["gnu_legacy"] }
|
||||
lscolors = { workspace = true }
|
||||
uucore = { workspace = true, features = [
|
||||
"entries",
|
||||
"fs",
|
||||
|
|
|
@ -1983,20 +1983,6 @@ fn test_ls_recursive_1() {
|
|||
.stdout_is(out);
|
||||
}
|
||||
|
||||
// Function to convert a string to its ASCII representation
|
||||
fn to_ascii_representation(input: &str) -> String {
|
||||
input
|
||||
.chars()
|
||||
.map(|c| {
|
||||
if c.is_ascii_control() || !c.is_ascii() {
|
||||
format!("\\x{:02x}", c as u32)
|
||||
} else {
|
||||
c.to_string()
|
||||
}
|
||||
})
|
||||
.collect::<String>()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ls_color() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
|
@ -2058,8 +2044,8 @@ fn test_ls_color() {
|
|||
.succeeds();
|
||||
let expected = format!("{} test-color\x0ab {}", a_with_colors, z_with_colors);
|
||||
assert_eq!(
|
||||
to_ascii_representation(result.stdout_str()),
|
||||
to_ascii_representation(&expected)
|
||||
result.stdout_str().escape_default().to_string(),
|
||||
expected.escape_default().to_string()
|
||||
);
|
||||
assert_eq!(result.stdout_str(), expected);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue