diff options
author | Santiago M. Mola <santi@mola.io> | 2017-04-28 17:35:41 +0200 |
---|---|---|
committer | Santiago M. Mola <santi@mola.io> | 2017-06-02 16:41:37 +0200 |
commit | 756fe0c2e49d7a1d5de849026d3843b880b46a4d (patch) | |
tree | 88932b08d0a50b62b244b8cba15a254047aefa57 | |
parent | d823a80ce65c582d007a378901e534a0880d779d (diff) | |
download | go-git-756fe0c2e49d7a1d5de849026d3843b880b46a4d.tar.gz |
test: more Windows path handling
-rw-r--r-- | storage/filesystem/internal/dotgit/dotgit_test.go | 4 | ||||
-rw-r--r-- | submodule_test.go | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/storage/filesystem/internal/dotgit/dotgit_test.go b/storage/filesystem/internal/dotgit/dotgit_test.go index f06f908..e1667af 100644 --- a/storage/filesystem/internal/dotgit/dotgit_test.go +++ b/storage/filesystem/internal/dotgit/dotgit_test.go @@ -445,7 +445,7 @@ func (s *SuiteDotGit) TestObject(c *C) { file, err := dir.Object(hash) c.Assert(err, IsNil) c.Assert(strings.HasSuffix( - file.Filename(), "objects/03/db8e1fbe133a480f2867aac478fd866686d69e"), + file.Filename(), fs.Join("objects", "03", "db8e1fbe133a480f2867aac478fd866686d69e")), Equals, true, ) } @@ -465,5 +465,5 @@ func (s *SuiteDotGit) TestSubmodules(c *C) { dir := New(fs) m := dir.Module("basic") - c.Assert(strings.HasSuffix(m.Base(), ".git/module/basic"), Equals, true) + c.Assert(strings.HasSuffix(m.Base(), m.Join(".git", "module", "basic")), Equals, true) } diff --git a/submodule_test.go b/submodule_test.go index fdbe4a8..2d3f7a6 100644 --- a/submodule_test.go +++ b/submodule_test.go @@ -127,7 +127,8 @@ func (s *SubmoduleSuite) TestUpdateWithRecursion(c *C) { c.Assert(err, IsNil) - _, err = s.Worktree.fs.Stat("itself/basic/LICENSE") + fs := s.Worktree.fs + _, err = fs.Stat(fs.Join("itself", "basic", "LICENSE")) c.Assert(err, IsNil) } |