Mercurial > prosody-hg
comparison tests/test_util_jid.lua @ 556:624367a765cd
Add a couple more tests for jid.split
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 05 Dec 2008 02:02:40 +0000 |
| parents | cccd610a0ef9 |
| children | 4ae3e81513f3 |
comparison
equal
deleted
inserted
replaced
| 555:1c29c0b22022 | 556:624367a765cd |
|---|---|
| 31 test("server", nil, "server", nil ); | 31 test("server", nil, "server", nil ); |
| 32 test("server/resource", nil, "server", "resource" ); | 32 test("server/resource", nil, "server", "resource" ); |
| 33 test(nil, nil, nil , nil ); | 33 test(nil, nil, nil , nil ); |
| 34 | 34 |
| 35 test("node@/server", nil, nil, nil , nil ); | 35 test("node@/server", nil, nil, nil , nil ); |
| 36 test("@server", nil, nil, nil , nil ); | |
| 37 test("@server/resource",nil,nil,nil, nil ); | |
| 36 end | 38 end |
| 37 | 39 |
| 38 function bare(bare) | 40 function bare(bare) |
| 39 assert_equal(bare("user@host"), "user@host", "bare JID remains bare"); | 41 assert_equal(bare("user@host"), "user@host", "bare JID remains bare"); |
| 40 assert_equal(bare("host"), "host", "Host JID remains host"); | 42 assert_equal(bare("host"), "host", "Host JID remains host"); |
