From ee515b57c3f26d4d2cf93ce3eac67b00b86c74a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 23:12:38 +0000 Subject: [PATCH 1/2] build(deps): bump lscolors from 0.7.1 to 0.9.0 Bumps [lscolors](https://github.com/sharkdp/lscolors) from 0.7.1 to 0.9.0. - [Release notes](https://github.com/sharkdp/lscolors/releases) - [Commits](https://github.com/sharkdp/lscolors/compare/v0.7.1...v0.9.0) --- updated-dependencies: - dependency-name: lscolors dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- src/uu/ls/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bed803490..0de066b34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1093,9 +1093,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 d082c8260..bd13588de 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" From 54b2fe700b7d587fd93fdc2c62755b4bf30c4315 Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Thu, 7 Apr 2022 11:05:20 +0200 Subject: [PATCH 2/2] fix regressed test due to lscolors update --- tests/by-util/test_ls.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index f60d53b6e..dd362208b 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,