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