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