Skip to content

Commit 4bd8f85

Browse files
committed
fix test for windows
1 parent 9949237 commit 4bd8f85

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

vcs_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Last Changed Date: 2019-08-16 15:16:45 +0900 (Fri, 16 Aug 2019)
2929
func TestVCSBackend(t *testing.T) {
3030
tempDir := newTempDir(t)
3131
localDir := filepath.Join(tempDir, "repo")
32+
tempDirSl := filepath.Join(tempDir, "")
3233
_commands := []*exec.Cmd{}
3334
lastCommand := func() *exec.Cmd { return _commands[len(_commands)-1] }
3435
defer func(orig func(cmd *exec.Cmd) error) {
@@ -56,7 +57,7 @@ func TestVCSBackend(t *testing.T) {
5657
})
5758
},
5859
expect: []string{"git", "clone", remoteDummyURL.String(), localDir},
59-
dir: tempDir + "/",
60+
dir: tempDirSl,
6061
}, {
6162
name: "[git] shallow clone",
6263
f: func() error {
@@ -68,7 +69,7 @@ func TestVCSBackend(t *testing.T) {
6869
})
6970
},
7071
expect: []string{"git", "clone", "--depth", "1", remoteDummyURL.String(), localDir},
71-
dir: tempDir + "/",
72+
dir: tempDirSl,
7273
}, {
7374
name: "[git] clone specific branch",
7475
f: func() error {
@@ -118,7 +119,7 @@ func TestVCSBackend(t *testing.T) {
118119
})
119120
},
120121
expect: []string{"git", "clone", "--recursive", remoteDummyURL.String(), localDir},
121-
dir:tempDir + "/",
122+
dir:tempDirSl,
122123
}, {
123124
name: "[git] update recursive",
124125
f: func() error {
@@ -140,7 +141,7 @@ func TestVCSBackend(t *testing.T) {
140141
})
141142
},
142143
expect: []string{"git", "clone", "--bare", remoteDummyURL.String(), localDir},
143-
dir:tempDir + "/",
144+
dir:tempDirSl,
144145
}, {
145146
name: "[git] switch git-svn on update",
146147
f: func() error {

0 commit comments

Comments
 (0)