From 48c4c82ab3cf0159be57fcd4c84645c3d9f20faa Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Thu, 24 Apr 2025 15:00:09 +0200 Subject: [PATCH] id: remove unnecessary #[cfg(unix)] in tests --- tests/by-util/test_id.rs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/tests/by-util/test_id.rs b/tests/by-util/test_id.rs index 6719d9f8a..c678a0b11 100644 --- a/tests/by-util/test_id.rs +++ b/tests/by-util/test_id.rs @@ -18,7 +18,6 @@ fn test_invalid_arg() { } #[test] -#[cfg(unix)] #[allow(unused_mut)] fn test_id_no_specified_user() { let ts = TestScenario::new(util_name!()); @@ -44,7 +43,6 @@ fn test_id_no_specified_user() { } #[test] -#[cfg(unix)] fn test_id_single_user() { let test_users = [&whoami()[..]]; @@ -96,7 +94,6 @@ fn test_id_single_user() { } #[test] -#[cfg(unix)] fn test_id_single_user_non_existing() { let args = &["hopefully_non_existing_username"]; let ts = TestScenario::new(util_name!()); @@ -114,7 +111,6 @@ fn test_id_single_user_non_existing() { } #[test] -#[cfg(unix)] fn test_id_name() { let ts = TestScenario::new(util_name!()); for opt in ["--user", "--group", "--groups"] { @@ -133,7 +129,6 @@ fn test_id_name() { } #[test] -#[cfg(unix)] fn test_id_real() { let ts = TestScenario::new(util_name!()); for opt in ["--user", "--group", "--groups"] { @@ -148,7 +143,7 @@ fn test_id_real() { } #[test] -#[cfg(all(unix, not(any(target_os = "linux", target_os = "android"))))] +#[cfg(not(any(target_os = "linux", target_os = "android")))] fn test_id_pretty_print() { // `-p` is BSD only and not supported on GNU's `id` let username = whoami(); @@ -157,7 +152,7 @@ fn test_id_pretty_print() { } #[test] -#[cfg(all(unix, not(any(target_os = "linux", target_os = "android"))))] +#[cfg(not(any(target_os = "linux", target_os = "android")))] fn test_id_password_style() { // `-P` is BSD only and not supported on GNU's `id` let username = whoami(); @@ -166,7 +161,6 @@ fn test_id_password_style() { } #[test] -#[cfg(unix)] fn test_id_multiple_users() { unwrap_or_return!(check_coreutil_version( util_name!(), @@ -224,7 +218,6 @@ fn test_id_multiple_users() { } #[test] -#[cfg(unix)] fn test_id_multiple_users_non_existing() { unwrap_or_return!(check_coreutil_version( util_name!(), @@ -302,7 +295,6 @@ fn test_id_name_or_real_with_default_format() { } #[test] -#[cfg(unix)] fn test_id_default_format() { let ts = TestScenario::new(util_name!()); for opt1 in ["--name", "--real"] { @@ -355,7 +347,6 @@ fn test_id_zero_with_name_or_real() { } #[test] -#[cfg(unix)] fn test_id_zero() { let ts = TestScenario::new(util_name!()); for z_flag in ["-z", "--zero"] { @@ -444,7 +435,6 @@ fn test_id_context() { } #[test] -#[cfg(unix)] fn test_id_no_specified_user_posixly() { // gnu/tests/id/no-context.sh @@ -471,7 +461,7 @@ fn test_id_no_specified_user_posixly() { } #[test] -#[cfg(all(unix, not(target_os = "android")))] +#[cfg(not(target_os = "android"))] fn test_id_pretty_print_password_record() { // `-p` is BSD only and not supported on GNU's `id`. // `-P` is our own extension, and not supported by either GNU nor BSD.