mirror of
https://github.com/gechandesu/pwd.git
synced 2026-03-25 21:13:14 +03:00
18 lines
259 B
V
18 lines
259 B
V
// vtest build: !windows
|
|
import pwd
|
|
|
|
fn test_user_by_uid() {
|
|
pw := pwd.user_by_uid(0)!
|
|
assert pw.name == 'root'
|
|
}
|
|
|
|
fn test_user_by_name() {
|
|
pw := pwd.user_by_name('root')!
|
|
assert pw.uid == 0
|
|
}
|
|
|
|
fn test_users() {
|
|
pws := pwd.users()!
|
|
assert pws.len > 0
|
|
}
|