diff options
author | Jadi <jadijadi@gmail.com> | 2024-05-16 17:54:22 +0330 |
---|---|---|
committer | Jadi <jadijadi@gmail.com> | 2024-06-29 08:19:24 +0330 |
commit | 576341bb9389b254fd198ed2906b8838b406c707 (patch) | |
tree | bbc3b0a99476c636bf4a0756a0d69a1dc6ddff4c /tests/by-util | |
parent | 92665144c9ddf100d5044dc0c52af122a94587d0 (diff) |
users: support OpenBS using utmp
OpenBSD uses the original utmp file format so the general `users` does not
work there. By using the `utmp-classic` lib, we cna process the current users
on the system from the /var/run/utmp and show the list.
fixes #5665
Diffstat (limited to 'tests/by-util')
-rw-r--r-- | tests/by-util/test_users.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/by-util/test_users.rs b/tests/by-util/test_users.rs index 3d87aa9d0..9ca548fb9 100644 --- a/tests/by-util/test_users.rs +++ b/tests/by-util/test_users.rs @@ -31,3 +31,12 @@ fn test_users_check_name() { new_ucmd!().succeeds().stdout_is(&expected); } + +#[test] +#[cfg(target_os = "openbsd")] +fn test_users_check_name_openbsd() { + new_ucmd!() + .args(&["openbsd_utmp"]) + .run() + .stdout_contains("test"); +} |