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