# HG changeset patch # User Matthew Wild # Date 1226275099 0 # Node ID 6f4e9911c7d147cd8ccf4ec16adf74d0621ce1f2 # Parent a8e0d0faade3ec608ec0b652fb83c4ab7a832662 Fix jid.split test function diff -r a8e0d0faade3 -r 6f4e9911c7d1 tests/test_util_jid.lua --- a/tests/test_util_jid.lua Sun Nov 09 23:54:54 2008 +0000 +++ b/tests/test_util_jid.lua Sun Nov 09 23:58:19 2008 +0000 @@ -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