aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_util_jid.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_util_jid.lua')
-rw-r--r--tests/test_util_jid.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_util_jid.lua b/tests/test_util_jid.lua
index 3be0bfa1..58fadbb7 100644
--- a/tests/test_util_jid.lua
+++ b/tests/test_util_jid.lua
@@ -2,12 +2,13 @@
function split(split)
function test(jid, node, server, resource)
local rnode, rserver, rresource = split(jid);
- assert_equal(node, rnode, "split("..jid..") failed");
- assert_equal(server, rserver, "split("..jid..") failed");
- assert_equal(resource, rresource, "split("..jid..") failed");
+ assert_equal(node, rnode, "split("..tostring(jid)..") failed");
+ assert_equal(server, rserver, "split("..tostring(jid)..") failed");
+ assert_equal(resource, rresource, "split("..tostring(jid)..") failed");
end
test("node@server", "node", "server", nil );
test("node@server/resource", "node", "server", "resource" );
test("server", nil, "server", nil );
test("server/resource", nil, "server", "resource" );
+ test(nil, nil, nil , nil );
end