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