Skip to content

Commit

Permalink
fix test for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuo-ozu committed Oct 7, 2022
1 parent 9949237 commit 4bd8f85
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Last Changed Date: 2019-08-16 15:16:45 +0900 (Fri, 16 Aug 2019)
func TestVCSBackend(t *testing.T) {
tempDir := newTempDir(t)
localDir := filepath.Join(tempDir, "repo")
tempDirSl := filepath.Join(tempDir, "")
_commands := []*exec.Cmd{}
lastCommand := func() *exec.Cmd { return _commands[len(_commands)-1] }
defer func(orig func(cmd *exec.Cmd) error) {
Expand Down Expand Up @@ -56,7 +57,7 @@ func TestVCSBackend(t *testing.T) {
})
},
expect: []string{"git", "clone", remoteDummyURL.String(), localDir},
dir: tempDir + "/",
dir: tempDirSl,
}, {
name: "[git] shallow clone",
f: func() error {
Expand All @@ -68,7 +69,7 @@ func TestVCSBackend(t *testing.T) {
})
},
expect: []string{"git", "clone", "--depth", "1", remoteDummyURL.String(), localDir},
dir: tempDir + "/",
dir: tempDirSl,
}, {
name: "[git] clone specific branch",
f: func() error {
Expand Down Expand Up @@ -118,7 +119,7 @@ func TestVCSBackend(t *testing.T) {
})
},
expect: []string{"git", "clone", "--recursive", remoteDummyURL.String(), localDir},
dir:tempDir + "/",
dir:tempDirSl,
}, {
name: "[git] update recursive",
f: func() error {
Expand All @@ -140,7 +141,7 @@ func TestVCSBackend(t *testing.T) {
})
},
expect: []string{"git", "clone", "--bare", remoteDummyURL.String(), localDir},
dir:tempDir + "/",
dir:tempDirSl,
}, {
name: "[git] switch git-svn on update",
f: func() error {
Expand Down

0 comments on commit 4bd8f85

Please sign in to comment.