mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
cp: fix "unused variable" warning on Windows
This commit is contained in:
parent
461047c6a6
commit
732dbb3f12
1 changed files with 24 additions and 12 deletions
|
@ -3127,6 +3127,17 @@ fn test_cp_debug_sparse_auto() {
|
|||
let ts = TestScenario::new(util_name!());
|
||||
let at = &ts.fixtures;
|
||||
at.touch("a");
|
||||
|
||||
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
|
||||
ts.ucmd()
|
||||
.arg("--debug")
|
||||
.arg("--sparse=auto")
|
||||
.arg("a")
|
||||
.arg("b")
|
||||
.succeeds();
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
{
|
||||
let result = ts
|
||||
.ucmd()
|
||||
.arg("--debug")
|
||||
|
@ -3135,7 +3146,6 @@ fn test_cp_debug_sparse_auto() {
|
|||
.arg("b")
|
||||
.succeeds();
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
let stdout_str = result.stdout_str();
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
|
@ -3146,10 +3156,12 @@ fn test_cp_debug_sparse_auto() {
|
|||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
if !stdout_str.contains("copy offload: unknown, reflink: unsupported, sparse detection: no") {
|
||||
if !stdout_str.contains("copy offload: unknown, reflink: unsupported, sparse detection: no")
|
||||
{
|
||||
panic!("Failure: stdout was \n{stdout_str}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(target_os = "linux", target_os = "android", target_os = "macos"))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue