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