update uutils crates (#14371)

# Description

This PR updates the uutils/coreutils crates to the latest version. I
hard-coded debug to false, a new uu_mv parameter. It may be interesting
to add that but I just wanted to get all the uu crates on the same
version.

I had to update the tests because --no-clobber works but doesn't say
anything when it's not clobbering and previously we were checking for an
error message.


# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use toolkit.nu; toolkit test stdlib"` to run the
tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
This commit is contained in:
Darren Schroeder
2024-11-17 19:31:36 -06:00
committed by GitHub
parent f63f8cb154
commit 13ce9e4f64
5 changed files with 37 additions and 32 deletions

View File

@ -513,13 +513,18 @@ fn test_mv_no_clobber() {
sandbox.with_files(&[EmptyFile(file_a)]);
sandbox.with_files(&[EmptyFile(file_b)]);
let actual = nu!(
let _ = nu!(
cwd: dirs.test(),
"mv -n {} {}",
file_a,
file_b,
);
assert!(actual.err.contains("not replacing"));
let file_count = nu!(
cwd: dirs.test(),
"ls test_mv* | length | to nuon"
);
assert_eq!(file_count.out, "2");
})
}

View File

@ -841,14 +841,13 @@ fn test_cp_arg_no_clobber() {
let target = dirs.fixtures.join("cp").join(TEST_HOW_ARE_YOU_SOURCE);
let target_hash = get_file_hash(target.display());
let actual = nu!(
cwd: dirs.root(),
"cp {} {} --no-clobber",
src.display(),
target.display()
let _ = nu!(
cwd: dirs.root(),
"cp {} {} --no-clobber",
src.display(),
target.display()
);
let after_cp_hash = get_file_hash(target.display());
assert!(actual.err.contains("not replacing"));
// Check content was not clobbered
assert_eq!(after_cp_hash, target_hash);
});