1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
before:
this_module = 'posix.syslog'
global_table = '_G'
M = require(this_module)
specify posix.syslog:
- context when required:
- it does not touch the global table:
expect(show_apis {added_to=global_table, by=this_module}).
to_equal {}
- describe LOG_MASK:
- context with bad arguments:
if M.LOG_MASK then
badargs.diagnose(M.LOG_MASK, "(int)")
end
- describe closelog:
- context with bad arguments:
if M.closelog then
badargs.diagnose(M.closelog, "()")
end
- describe openlog:
- context with bad arguments: |
if M.openlog then
badargs.diagnose(M.openlog, "(string, ?int, ?int)")
end
- describe setlogmask:
- context with bad arguments:
if M.setlogmask then
badargs.diagnose(M.setlogmask, "(?int)")
end
- describe syslog:
- context with bad arguments:
if M.syslog then
badargs.diagnose(M.syslog, "(int, string)")
end
|