Skip to content

Commit 2ef91bb

Browse files
committed
Use OS path separator in testing, fixes #30
1 parent bd8ed46 commit 2ef91bb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

git_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ func TestObjectParse(t *testing.T) {
2828
return nil
2929
}
3030

31-
parts := strings.Split(path, "/")
31+
parts := strings.Split(path, string(filepath.Separator))
32+
3233
dir := parts[len(parts)-2]
3334
if dir == "info" || dir == "pack" {
3435
return nil
@@ -360,7 +361,7 @@ func BenchmarkRawData(b *testing.B) {
360361
return nil
361362
}
362363

363-
parts := strings.Split(path, "/")
364+
parts := strings.Split(path, string(filepath.Separator))
364365
if dir := parts[len(parts)-2]; dir == "info" || dir == "pack" {
365366
return nil
366367
}
@@ -393,7 +394,7 @@ func BenchmarkCid(b *testing.B) {
393394
return nil
394395
}
395396

396-
parts := strings.Split(path, "/")
397+
parts := strings.Split(path, string(filepath.Separator))
397398
if dir := parts[len(parts)-2]; dir == "info" || dir == "pack" {
398399
return nil
399400
}

0 commit comments

Comments
 (0)