rename nushell's cp command to cp-old making coreutils the default cp (#10678)

# Description

This PR renames nushell's `cp` command to `cp-old` to make room for
`ucp` to be renamed to `cp`, making the coreutils version of `cp` the
default for nushell. After some period of time, we should remove
`cp-old` entirely.

# 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 std testing; testing run-tests --path
crates/nu-std"` 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
2023-10-10 18:13:28 -05:00
committed by GitHub
parent c81fa397b6
commit 0ba81f1d51
6 changed files with 60 additions and 71 deletions

View File

@ -373,6 +373,7 @@ fn copy_file_and_dir_from_two_parents_up_using_multiple_dots_to_current_dir_recu
})
}
#[ignore = "duplicate test with slight differences in ucp"]
#[test]
fn copy_to_non_existing_dir() {
copy_to_non_existing_dir_impl(false);
@ -395,6 +396,7 @@ fn copy_to_non_existing_dir_impl(progress: bool) {
});
}
#[ignore = "duplicate test with slight differences in ucp"]
#[test]
fn copy_dir_contains_symlink_ignored() {
copy_dir_contains_symlink_ignored_impl(false);
@ -488,6 +490,7 @@ fn copy_dir_symlink_file_body_not_changed_impl(progress: bool) {
});
}
#[ignore = "duplicate test with slight differences in ucp"]
#[test]
fn copy_identical_file() {
copy_identical_file_impl(false);
@ -530,6 +533,7 @@ fn copy_ignores_ansi_impl(progress: bool) {
});
}
#[ignore = "duplicate test with ucp with slight differences"]
#[test]
fn copy_file_not_exists_dst() {
copy_file_not_exists_dst_impl(false);
@ -573,13 +577,12 @@ fn copy_file_with_read_permission_impl(progress: bool) {
"cp {} valid.txt invalid_prem.txt",
progress_flag,
);
assert!(
actual.err.contains("invalid_prem.txt")
&& actual.err.contains("copying to destination")
);
assert!(actual.err.contains("invalid_prem.txt") && actual.err.contains("denied"));
});
}
#[ignore = "not implemented with ucp"]
#[test]
fn copy_file_with_update_flag() {
copy_file_with_update_flag_impl(false);