mirror of
https://github.com/foomo/gotsrpc.git
synced 2025-10-16 12:35:35 +00:00
14 lines
314 B
Go
14 lines
314 B
Go
package gotsrpc
|
|
|
|
import "testing"
|
|
|
|
func TestSplit(t *testing.T) {
|
|
res := split("git.bestbytes.net/foo-bar", []string{".", "/", "-"})
|
|
for i, expected := range []string{"git", "bestbytes", "net", "foo", "bar"} {
|
|
actual := res[i]
|
|
if actual != expected {
|
|
t.Fatal("expected", expected, "got", actual)
|
|
}
|
|
}
|
|
}
|