mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-28 22:39:05 +08:00
19 lines
342 B
Go
19 lines
342 B
Go
package handlers
|
|
|
|
import "testing"
|
|
|
|
var dirNameTests = []struct {
|
|
url string
|
|
want string
|
|
}{
|
|
{"github.com/foo/bar", "_repos/src/github.com/foo/bar"},
|
|
}
|
|
|
|
func TestDirName(t *testing.T) {
|
|
for _, tt := range dirNameTests {
|
|
if got := dirName(tt.url); got != tt.want {
|
|
t.Errorf("dirName(%q) = %q, want %q", tt.url, got, tt.want)
|
|
}
|
|
}
|
|
}
|