1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

cp: add --reflink support for macOS

Fixes #1773
This commit is contained in:
Nicolas Thery 2021-04-24 19:20:31 +02:00
parent b8e23c20c2
commit 4bf33e98a8
2 changed files with 68 additions and 8 deletions

View file

@ -967,7 +967,7 @@ fn test_cp_one_file_system() {
}
#[test]
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "macos"))]
fn test_cp_reflink_always() {
let (at, mut ucmd) = at_and_ucmd!();
let result = ucmd
@ -985,7 +985,7 @@ fn test_cp_reflink_always() {
}
#[test]
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "macos"))]
fn test_cp_reflink_auto() {
let (at, mut ucmd) = at_and_ucmd!();
ucmd.arg("--reflink=auto")
@ -998,7 +998,7 @@ fn test_cp_reflink_auto() {
}
#[test]
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "macos"))]
fn test_cp_reflink_never() {
let (at, mut ucmd) = at_and_ucmd!();
ucmd.arg("--reflink=never")
@ -1011,7 +1011,7 @@ fn test_cp_reflink_never() {
}
#[test]
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "macos"))]
fn test_cp_reflink_bad() {
let (_, mut ucmd) = at_and_ucmd!();
let _result = ucmd