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