1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 21:47:46 +00:00

Merge pull request #2437 from miDeb/cp/reflink-auto

cp: default to --reflink=auto on linux and macos
This commit is contained in:
Sylvestre Ledru 2021-06-23 12:37:44 +02:00 committed by GitHub
commit a73e71ba74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 18 deletions

View file

@ -1325,3 +1325,16 @@ fn test_copy_dir_with_symlinks() {
ucmd.args(&["-r", "dir", "copy"]).succeeds();
assert_eq!(at.resolve_link("copy/file-link"), "file");
}
#[test]
#[cfg(not(windows))]
fn test_copy_symlink_force() {
let (at, mut ucmd) = at_and_ucmd!();
at.touch("file");
at.symlink_file("file", "file-link");
at.touch("copy");
ucmd.args(&["file-link", "copy", "-f", "--no-dereference"])
.succeeds();
assert_eq!(at.resolve_link("copy"), "file");
}