feat: Add --remote (#1387)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
23
tools/goctl/util/file_test.go
Normal file
23
tools/goctl/util/file_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestGetGitHome(t *testing.T) {
|
||||
homeDir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
actual, err := GetGitHome()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
expected := filepath.Join(homeDir, goctlDir, gitDir)
|
||||
assert.Equal(t, expected, actual)
|
||||
}
|
||||
Reference in New Issue
Block a user