Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 1d846e8

Browse files
committed
test: more Windows path handling
1 parent fea559a commit 1d846e8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

storage/filesystem/internal/dotgit/dotgit_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ func (s *SuiteDotGit) TestObject(c *C) {
420420
file, err := dir.Object(hash)
421421
c.Assert(err, IsNil)
422422
c.Assert(strings.HasSuffix(
423-
file.Filename(), "objects/03/db8e1fbe133a480f2867aac478fd866686d69e"),
423+
file.Filename(), fs.Join("objects", "03", "db8e1fbe133a480f2867aac478fd866686d69e")),
424424
Equals, true,
425425
)
426426
}
@@ -440,5 +440,5 @@ func (s *SuiteDotGit) TestSubmodules(c *C) {
440440
dir := New(fs)
441441

442442
m := dir.Module("basic")
443-
c.Assert(strings.HasSuffix(m.Base(), ".git/module/basic"), Equals, true)
443+
c.Assert(strings.HasSuffix(m.Base(), m.Join(".git", "module", "basic")), Equals, true)
444444
}

submodule_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ func (s *SubmoduleSuite) TestUpdateWithRecursion(c *C) {
127127

128128
c.Assert(err, IsNil)
129129

130-
_, err = s.Worktree.fs.Stat("itself/basic/LICENSE")
130+
fs := s.Worktree.fs
131+
_, err = fs.Stat(fs.Join("itself", "basic", "LICENSE"))
131132
c.Assert(err, IsNil)
132133
}
133134

0 commit comments

Comments
 (0)