mirror of
https://github.com/gechandesu/pwd.git
synced 2026-03-25 21:13:14 +03:00
This reverts commit 2d9ec0bf59.
The name `pwd` is still better, since it matches the name of the corresponding C header file.
18 lines
258 B
V
18 lines
258 B
V
// vtest build: !windows
|
|
import pwd
|
|
|
|
fn test_get_by_uid() {
|
|
pw := pwd.get_by_uid(0)!
|
|
assert pw.name == 'root'
|
|
}
|
|
|
|
fn test_get_by_name() {
|
|
pw := pwd.get_by_name('root')!
|
|
assert pw.uid == 0
|
|
}
|
|
|
|
fn test_get_all() {
|
|
pws := pwd.get_all()
|
|
assert pws.len > 0
|
|
}
|