Mercurial > prosody-hg
view util/xpcall.lua @ 10697:08ec83f90ce0
MUC: Add test for destroying a room by ad-hoc command
Testing ad-hoc commands was not easily doable before 49312378ba1d
relaxed the need for state and an extra roundtrip to execute commands
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 20 Mar 2020 18:52:41 +0100 |
| parents | cfc7b2f7251e |
| children | d10957394a3c |
line wrap: on
line source
local xpcall = xpcall; if select(2, xpcall(function (x) return x end, function () end, "test")) ~= "test" then xpcall = require"util.compat".xpcall; end return { xpcall = xpcall; };
