aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-09 23:58:19 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-09 23:58:19 +0000
commitdfe7f483e474b7f37a577904c318b4389bd1fd90 (patch)
tree401a8aa0a92945107aaeea435b93f5e05a3ced63
parent678df8a8dcc33cbd3bb61196053b351609726009 (diff)
downloadprosody-dfe7f483e474b7f37a577904c318b4389bd1fd90.tar.gz
prosody-dfe7f483e474b7f37a577904c318b4389bd1fd90.zip
Fix jid.split test function
-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