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:
commit
a73e71ba74
2 changed files with 54 additions and 18 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue