xref: /freebsd/libexec/nuageinit/tests/adduser.lua (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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