From dcc1b9270d875ebb18500180e56ec6dd94444fe5 Mon Sep 17 00:00:00 2001 From: Eriks Zelenka Date: Sat, 7 Dec 2024 19:22:19 +0000 Subject: [PATCH] Fix typo --- gitget/get_test.go | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/gitget/get_test.go b/gitget/get_test.go index a15880a..2eab975 100644 --- a/gitget/get_test.go +++ b/gitget/get_test.go @@ -35,7 +35,6 @@ func Test_SetDefaultRef(t *testing.T) { } func Test_GetRepoLocalName(t *testing.T) { - // Test extracting altname from git repo name, if altname is not specified var altname string for repoURL, expectedAltName := range repoUrls { @@ -52,7 +51,6 @@ func Test_GetRepoLocalName(t *testing.T) { } func Test_SetRepoLocalName(t *testing.T) { - for repoURL, expectedAltName := range repoUrls { repo := Repo{} repo.URL = repoURL @@ -368,14 +366,22 @@ func Test_Repo_IsClean(t *testing.T) { } testCases := []testCase{ - {name: "test 1: no error", expectedResult: true, - repo: Repo{fullPath: "cde_p"}, err1: nil, err2: nil}, - {name: "test 2: err1 raised", expectedResult: false, - repo: Repo{fullPath: "cde_a"}, err1: fmt.Errorf("test error"), err2: nil}, - {name: "test 3: err2 raised", expectedResult: false, - repo: Repo{fullPath: "cde_a"}, err1: nil, err2: fmt.Errorf("test error")}, - {name: "test 3: err1 and err2 can be raised", expectedResult: false, - repo: Repo{fullPath: "cde_a"}, err1: fmt.Errorf("test error"), err2: fmt.Errorf("test error")}, + { + name: "test 1: no error", expectedResult: true, + repo: Repo{fullPath: "cde_p"}, err1: nil, err2: nil, + }, + { + name: "test 2: err1 raised", expectedResult: false, + repo: Repo{fullPath: "cde_a"}, err1: fmt.Errorf("test error"), err2: nil, + }, + { + name: "test 3: err2 raised", expectedResult: false, + repo: Repo{fullPath: "cde_a"}, err1: nil, err2: fmt.Errorf("test error"), + }, + { + name: "test 3: err1 and err2 can be raised", expectedResult: false, + repo: Repo{fullPath: "cde_a"}, err1: fmt.Errorf("test error"), err2: fmt.Errorf("test error"), + }, } for _, tc := range testCases {