blob: b900b9c64fb108c7a8425644eb969b1818c9d170 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package xmpp
import (
"testing"
)
func TestDomainpart(t *testing.T) {
var data = map[string]string{
"user@example.org/ressource": "example.org",
"example.org/ressource": "example.org",
"user@example.org": "example.org",
"example.org": "example.org",
"test.eu": "test.eu",
}
for k, v := range(data) {
if domainpart(k) != v {
t.Fatalf("Domain part of JID '%s' is not '%s'!", k, v)
}
}
}
|