aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_util_jid.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_util_jid.lua b/tests/test_util_jid.lua
index ac17f253..a817e644 100644
--- a/tests/test_util_jid.lua
+++ b/tests/test_util_jid.lua
@@ -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)