simple testing framework

This commit is contained in:
Daniel Kahn Gillmor
2019-02-18 07:55:33 -05:00
parent b3db013754
commit 72ed000ccf
3 changed files with 73 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
-- -*- lua -*-
mt.echo("beginning test")
conn = mt.connect("unix:signing.sock")
if conn == nil then
error "mt.connect() failed"
end
if mt.conninfo(conn, "localhost", "127.0.0.1") ~= nil then
error "mt.conninfo() failed"
end
if mt.getreply(conn) ~= SMFIR_CONTINUE then
error "mt.conninfo() unexpected reply"
end
mt.disconnect(conn)
mt.echo("test complete")