mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
tests/test_util_jid.lua: Add more tests for JID splitting
This commit is contained in:
parent
e3718ed22e
commit
0c0140fa2d
1 changed files with 6 additions and 3 deletions
|
@ -28,15 +28,18 @@ function split(split)
|
|||
|
||||
-- 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("node@server/resource", "node", "server", "resource" );
|
||||
test("server", nil, "server", nil );
|
||||
test("server/resource", nil, "server", "resource" );
|
||||
test("server/resource@foo", nil, "server", "resource@foo" );
|
||||
test("server/resource@foo/bar", nil, "server", "resource@foo/bar");
|
||||
|
||||
-- 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);
|
||||
test("@/resource", nil, nil, nil);
|
||||
end
|
||||
|
||||
function bare(bare)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue