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

pinky: improve tests

This commit is contained in:
Justin Tracey 2022-02-22 17:35:16 -05:00
parent 9430a9f355
commit f52f655934
2 changed files with 38 additions and 12 deletions

View file

@ -44,7 +44,14 @@ fn test_long_format() {
#[cfg(unix)]
#[test]
fn test_long_format_multiple_users() {
let args = ["-l", "root", "root", "root"];
// multiple instances of one account we know exists,
// the account of the test runner,
// and an account that (probably) doesn't exist
let runner = match std::env::var("USER") {
Ok(user) => user,
Err(_) => "".to_string(),
};
let args = ["-l", "root", "root", "root", &runner, "no_such_user"];
let ts = TestScenario::new(util_name!());
let expect = unwrap_or_return!(expected_result(&ts, &args));