hugin/cli/internal/repo/repo_test.go
2026-10-27 08:33:21 +01:00

17 lines
585 B
Go

package repo
import "testing"
func TestUnify(t *testing.T) {
for url, expected := range map[string]string{
"https://git.intern/shop/api.git": "git.intern/shop/api",
"https://user:geheim@Git.Intern/shop/api": "git.intern/shop/api",
"git@git.intern:shop/api.git": "git.intern/shop/api",
"ssh://git@git.intern:2222/shop/api.git": "git.intern/shop/api",
"https://git.intern:8443/shop/api/": "git.intern:8443/shop/api",
} {
if got := Unify(url); got != expected {
t.Errorf("Vereinheitlichen(%q) = %q, erwartet %q", url, got, expected)
}
}
}