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