# HG changeset patch # User Matthew Wild # Date 1281445623 -3600 # Node ID 6402a9defcdc7131e655d00ff9e9af74948ec08b # Parent 4bd78a5fee759218f4f9861ffdfd473be579c84c tests/test_util_jid.lua: Better formatting, comments, and stop giving 5 arguments to a 4-argument function (thanks Asterix :) ) diff -r 4bd78a5fee75 -r 6402a9defcdc tests/test_util_jid.lua --- a/tests/test_util_jid.lua Sat Aug 07 19:00:04 2010 +0100 +++ b/tests/test_util_jid.lua Tue Aug 10 14:07:03 2010 +0100 @@ -25,15 +25,18 @@ assert_equal(expected_server, rserver, "split("..tostring(input_jid)..") failed"); assert_equal(expected_resource, rresource, "split("..tostring(input_jid)..") failed"); end + + -- Valid JIDs 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 ); - test("node@/server", nil, nil, nil , nil ); - test("@server", nil, nil, nil , nil ); - test("@server/resource",nil,nil,nil, nil ); + -- Always invalid JIDs + test(nil, nil, nil, nil); + test("node@/server", nil, nil, nil); + test("@server", nil, nil, nil); + test("@server/resource", nil, nil, nil); end function bare(bare)