mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Merge pull request #5014 from cakebaker/cp_du_fix_warnings_on_windows
cp,du: fix warnings in tests on Windows
This commit is contained in:
commit
461047c6a6
2 changed files with 11 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")]
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
// spell-checker:ignore (paths) sublink subwords azerty azeaze xcwww azeaz amaz azea qzerty tazerty tsublink
|
// spell-checker:ignore (paths) sublink subwords azerty azeaze xcwww azeaz amaz azea qzerty tazerty tsublink
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
#[cfg(not(windows))]
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue