mirror of
https://github.com/gechandesu/pwd.git
synced 2026-02-13 04:21:50 +03:00
init
This commit is contained in:
17
pwd_test.v
Normal file
17
pwd_test.v
Normal file
@@ -0,0 +1,17 @@
|
||||
// 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
|
||||
}
|
||||
Reference in New Issue
Block a user