From efff82cd9424a78012d68f4c70427eeeda1e50eb Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 10 Aug 2010 14:07:03 +0100 Subject: tests/test_util_jid.lua: Better formatting, comments, and stop giving 5 arguments to a 4-argument function (thanks Asterix :) ) --- tests/test_util_jid.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/test_util_jid.lua') diff --git a/tests/test_util_jid.lua b/tests/test_util_jid.lua index e91585bd..ac17f253 100644 --- a/tests/test_util_jid.lua +++ b/tests/test_util_jid.lua @@ -25,15 +25,18 @@ function split(split) 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) -- cgit v1.2.3