xref: /freebsd/libexec/nuageinit/tests/adduser.lua (revision 357378bbdedf24ce2b90e9bd831af4a9db3ec70a)
1#!/usr/libexec/flua
2
3local n = require("nuage")
4if n.adduser() then
5	n.err("adduser should not accept empty value")
6end
7if n.adduser("plop") then
8	n.err("adduser should not accept empty value")
9end
10local pw = {}
11pw.name = "impossible_username"
12local res = n.adduser(pw)
13if not res then
14	n.err("valid adduser should return a path")
15end
16