mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
id: refactor identifiers
* change of identifier names and spelling according to the suggestions in the review of #2446
This commit is contained in:
parent
178399c20e
commit
4b3da59b0e
2 changed files with 11 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::common::util::*;
|
||||
|
||||
// spell-checker:ignore (ToDO) testsuite coreutil
|
||||
// spell-checker:ignore (ToDO) coreutil
|
||||
|
||||
// These tests run the GNU coreutils `(g)id` binary in `$PATH` in order to gather reference values.
|
||||
// If the `(g)id` in `$PATH` doesn't include a coreutils version string,
|
||||
|
@ -8,8 +8,8 @@ use crate::common::util::*;
|
|||
|
||||
// The reference version is 8.32. Here 8.30 was chosen because right now there's no
|
||||
// ubuntu image for github action available with a higher version than 8.30.
|
||||
const VERSION_EXPECTED: &str = "8.30"; // Version expected for the reference `id` in $PATH
|
||||
const VERSION_MULTIPLE_USERS: &str = "8.31";
|
||||
const VERSION_MIN: &str = "8.30"; // minimum Version for the reference `id` in $PATH
|
||||
const VERSION_MIN_MULTIPLE_USERS: &str = "8.31"; // this feature was introduced in GNU's coreutils 8.31
|
||||
const UUTILS_WARNING: &str = "uutils-tests-warning";
|
||||
const UUTILS_INFO: &str = "uutils-tests-info";
|
||||
|
||||
|
@ -210,13 +210,13 @@ fn test_id_multiple_users() {
|
|||
let util_name = util_name!();
|
||||
#[cfg(all(unix, not(target_os = "linux")))]
|
||||
let util_name = &format!("g{}", util_name!());
|
||||
let version_check_string = check_coreutil_version(util_name, VERSION_MULTIPLE_USERS);
|
||||
let version_check_string = check_coreutil_version(util_name, VERSION_MIN_MULTIPLE_USERS);
|
||||
if version_check_string.starts_with(UUTILS_WARNING) {
|
||||
println!("{}\ntest skipped", version_check_string);
|
||||
return;
|
||||
}
|
||||
|
||||
// Same typical users that GNU testsuite is using.
|
||||
// Same typical users that GNU test suite is using.
|
||||
let test_users = ["root", "man", "postfix", "sshd", &whoami()];
|
||||
|
||||
let scene = TestScenario::new(util_name!());
|
||||
|
@ -278,7 +278,7 @@ fn test_id_multiple_users_non_existing() {
|
|||
let util_name = util_name!();
|
||||
#[cfg(all(unix, not(target_os = "linux")))]
|
||||
let util_name = &format!("g{}", util_name!());
|
||||
let version_check_string = check_coreutil_version(util_name, VERSION_MULTIPLE_USERS);
|
||||
let version_check_string = check_coreutil_version(util_name, VERSION_MIN_MULTIPLE_USERS);
|
||||
if version_check_string.starts_with(UUTILS_WARNING) {
|
||||
println!("{}\ntest skipped", version_check_string);
|
||||
return;
|
||||
|
@ -467,7 +467,7 @@ fn expected_result(args: &[&str]) -> Result<CmdResult, String> {
|
|||
#[cfg(all(unix, not(target_os = "linux")))]
|
||||
let util_name = &format!("g{}", util_name!());
|
||||
|
||||
let version_check_string = check_coreutil_version(util_name, VERSION_EXPECTED);
|
||||
let version_check_string = check_coreutil_version(util_name, VERSION_MIN);
|
||||
if version_check_string.starts_with(UUTILS_WARNING) {
|
||||
return Err(version_check_string);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue