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

uutils: change every target_os = "macos" to target_vendor = "apple"

This commit is contained in:
aspen 2021-03-17 21:32:34 -04:00
parent 99be7a3172
commit 4e29b693f8
No known key found for this signature in database
GPG key ID: 9CCE5F51B2F8C465
18 changed files with 64 additions and 74 deletions

View file

@ -12,7 +12,7 @@ fn test_du_basics() {
assert!(result.success);
assert_eq!(result.stderr, "");
}
#[cfg(target_os = "macos")]
#[cfg(target_vendor = "apple")]
fn _du_basics(s: String) {
let answer = "32\t./subdir
8\t./subdir/deeper
@ -21,7 +21,7 @@ fn _du_basics(s: String) {
";
assert_eq!(s, answer);
}
#[cfg(not(target_os = "macos"))]
#[cfg(not(target_vendor = "apple"))]
fn _du_basics(s: String) {
let answer = "28\t./subdir
8\t./subdir/deeper
@ -41,11 +41,11 @@ fn test_du_basics_subdir() {
_du_basics_subdir(result.stdout);
}
#[cfg(target_os = "macos")]
#[cfg(target_vendor = "apple")]
fn _du_basics_subdir(s: String) {
assert_eq!(s, "4\tsubdir/deeper\n");
}
#[cfg(not(target_os = "macos"))]
#[cfg(not(target_vendor = "apple"))]
fn _du_basics_subdir(s: String) {
// MS-WSL linux has altered expected output
if !is_wsl() {
@ -80,12 +80,12 @@ fn test_du_soft_link() {
_du_soft_link(result.stdout);
}
#[cfg(target_os = "macos")]
#[cfg(target_vendor = "apple")]
fn _du_soft_link(s: String) {
// 'macos' host variants may have `du` output variation for soft links
assert!((s == "12\tsubdir/links\n") || (s == "16\tsubdir/links\n"));
}
#[cfg(not(target_os = "macos"))]
#[cfg(not(target_vendor = "apple"))]
fn _du_soft_link(s: String) {
// MS-WSL linux has altered expected output
if !is_wsl() {
@ -109,11 +109,11 @@ fn test_du_hard_link() {
_du_hard_link(result.stdout);
}
#[cfg(target_os = "macos")]
#[cfg(target_vendor = "apple")]
fn _du_hard_link(s: String) {
assert_eq!(s, "12\tsubdir/links\n")
}
#[cfg(not(target_os = "macos"))]
#[cfg(not(target_vendor = "apple"))]
fn _du_hard_link(s: String) {
// MS-WSL linux has altered expected output
if !is_wsl() {
@ -133,11 +133,11 @@ fn test_du_d_flag() {
_du_d_flag(result.stdout);
}
#[cfg(target_os = "macos")]
#[cfg(target_vendor = "apple")]
fn _du_d_flag(s: String) {
assert_eq!(s, "16\t./subdir\n20\t./\n");
}
#[cfg(not(target_os = "macos"))]
#[cfg(not(target_vendor = "apple"))]
fn _du_d_flag(s: String) {
// MS-WSL linux has altered expected output
if !is_wsl() {