mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
cp: fix "unused variable" warnings on Windows
This commit is contained in:
parent
9149409065
commit
01f70768d9
1 changed files with 10 additions and 8 deletions
|
@ -1110,12 +1110,12 @@ fn test_cp_parents_with_permissions_copy_file() {
|
||||||
at.mkdir_all("p1/p2");
|
at.mkdir_all("p1/p2");
|
||||||
at.touch(file);
|
at.touch(file);
|
||||||
|
|
||||||
let p1_mode = 0o0777;
|
|
||||||
let p2_mode = 0o0711;
|
|
||||||
let file_mode = 0o0702;
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
{
|
{
|
||||||
|
let p1_mode = 0o0777;
|
||||||
|
let p2_mode = 0o0711;
|
||||||
|
let file_mode = 0o0702;
|
||||||
|
|
||||||
at.set_mode("p1", p1_mode);
|
at.set_mode("p1", p1_mode);
|
||||||
at.set_mode("p1/p2", p2_mode);
|
at.set_mode("p1/p2", p2_mode);
|
||||||
at.set_mode(file, file_mode);
|
at.set_mode(file, file_mode);
|
||||||
|
@ -1151,12 +1151,12 @@ fn test_cp_parents_with_permissions_copy_dir() {
|
||||||
at.mkdir_all(dir2);
|
at.mkdir_all(dir2);
|
||||||
at.touch(file);
|
at.touch(file);
|
||||||
|
|
||||||
let p1_mode = 0o0777;
|
|
||||||
let p2_mode = 0o0711;
|
|
||||||
let file_mode = 0o0702;
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
{
|
{
|
||||||
|
let p1_mode = 0o0777;
|
||||||
|
let p2_mode = 0o0711;
|
||||||
|
let file_mode = 0o0702;
|
||||||
|
|
||||||
at.set_mode("p1", p1_mode);
|
at.set_mode("p1", p1_mode);
|
||||||
at.set_mode("p1/p2", p2_mode);
|
at.set_mode("p1/p2", p2_mode);
|
||||||
at.set_mode(file, file_mode);
|
at.set_mode(file, file_mode);
|
||||||
|
@ -3134,6 +3134,8 @@ fn test_cp_debug_sparse_auto() {
|
||||||
.arg("a")
|
.arg("a")
|
||||||
.arg("b")
|
.arg("b")
|
||||||
.succeeds();
|
.succeeds();
|
||||||
|
|
||||||
|
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||||
let stdout_str = result.stdout_str();
|
let stdout_str = result.stdout_str();
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue