diff --git a/Cargo.lock b/Cargo.lock index a88d9c28e..e34fd2f01 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1090,9 +1090,9 @@ dependencies = [ [[package]] name = "lscolors" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24b894c45c9da468621cdd615a5a79ee5e5523dd4f75c76ebc03d458940c16e" +checksum = "4e9323b3525d4efad2dead1837a105e313253bfdbad1d470994038eededa4d62" dependencies = [ "ansi_term", ] diff --git a/src/uu/ls/Cargo.toml b/src/uu/ls/Cargo.toml index d7b1d47bd..ec092d06a 100644 --- a/src/uu/ls/Cargo.toml +++ b/src/uu/ls/Cargo.toml @@ -22,7 +22,7 @@ number_prefix = "0.4" term_grid = "0.1.5" termsize = "0.1.6" glob = "0.3.0" -lscolors = { version = "0.7.1", features = ["ansi_term"] } +lscolors = { version = "0.9.0", features = ["ansi_term"] } uucore = { version = ">=0.0.8", package = "uucore", path = "../../uucore", features = ["entries", "fs"] } once_cell = "1.10.0" atty = "0.2" diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 45ebc2382..f979d1e14 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -894,7 +894,7 @@ fn test_ls_long_symlink_color() { (Some([0, 0]), "ln-file1", None, "dir1/file1"), (Some([1, 1]), "ln-dir-invalid", Some([1, 1]), "dir1/dir2"), (Some([0, 0]), "ln-root", Some([0, 1]), "/"), - (Some([0, 0]), "ln-up2", Some([0, 1]), "../.."), + (Some([0, 0]), "ln-up2", None, "../.."), ]; // We are only interested in lines or the ls output that are symlinks. These start with "lrwx". @@ -912,6 +912,8 @@ fn test_ls_long_symlink_color() { while let Some((i, name, target)) = get_index_name_target(&mut result_lines) { // The unwraps within capture_colored_string will panic if the name/target's color // format is invalid. + dbg!(&name); + dbg!(&target); let (matched_name_color, matched_name) = capture_colored_string(&name); let (matched_target_color, matched_target) = capture_colored_string(&target); @@ -934,6 +936,7 @@ fn test_ls_long_symlink_color() { // Keep in mind an expected color `Option<&str>` of None can mean either that we // don't expect any color here, as in `expected_output[2], or don't know what specific // color to expect yet, as in expected_output[0:1]. + dbg!(&colors); assert_names_and_colors_are_equal( matched_name_color, expected_name_color,