diff options
Diffstat (limited to 'lib/lib_test.go')
| -rw-r--r-- | lib/lib_test.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/lib_test.go b/lib/lib_test.go deleted file mode 100644 index 7b46bfb..0000000 --- a/lib/lib_test.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2019, GrĂ©goire DuchĂȘne <gduchene@awhk.org> -// -// Use of this source code is governed by the ISC license that can be -// found in the LICENSE file. - -package lib - -import "testing" - -func TestGetDest(t *testing.T) { - cs := []struct{ srcPrefix, destPrefix, pkg, expected string }{ - {"src.example.com/x/", "https://example.com/git/", "src.example.com/x/foo", "https://example.com/git/foo"}, - {"src.example.com/x/", "https://example.com/git/", "src.example.com/x/foo/bar", "https://example.com/git/foo"}, - {"src.example.com/x", "https://example.com/git", "src.example.com/x/foo", "https://example.com/git/foo"}, - {"src.example.com/x", "https://example.com/git", "src.example.com/x/foo/bar", "https://example.com/git/foo"}, - } - for _, c := range cs { - actual := GetDest(c.srcPrefix, c.destPrefix, c.pkg) - if actual != c.expected { - t.Errorf("expected %s, got %s", c.expected, actual) - } - } -} |
