diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-11-09 23:58:19 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-11-09 23:58:19 +0000 |
commit | dfe7f483e474b7f37a577904c318b4389bd1fd90 (patch) | |
tree | 401a8aa0a92945107aaeea435b93f5e05a3ced63 /tests | |
parent | 678df8a8dcc33cbd3bb61196053b351609726009 (diff) | |
download | prosody-dfe7f483e474b7f37a577904c318b4389bd1fd90.tar.gz prosody-dfe7f483e474b7f37a577904c318b4389bd1fd90.zip |
Fix jid.split test function
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_util_jid.lua | 7 |
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 |