aboutsummaryrefslogtreecommitdiffstats
path: root/repository_test.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-04-28 17:13:02 +0200
committerSantiago M. Mola <santi@mola.io>2017-06-02 16:41:37 +0200
commit37f1ad489933c5460b4caf99d47dd66c3183ebd1 (patch)
treed30cede62d6424537de203367f06c1ec3026604a /repository_test.go
parent8670235d5eb85f9f8d7f933d9b26b7230590f6d6 (diff)
downloadgo-git-37f1ad489933c5460b4caf99d47dd66c3183ebd1.tar.gz
test: fix path handling in tests for Windows
Diffstat (limited to 'repository_test.go')
-rw-r--r--repository_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/repository_test.go b/repository_test.go
index deb3f58..a1b92ae 100644
--- a/repository_test.go
+++ b/repository_test.go
@@ -51,16 +51,16 @@ func (s *RepositorySuite) TestInitNonStandardDotGit(c *C) {
c.Assert(err, IsNil)
c.Assert(r, NotNil)
- f, err := fs.Open("worktree/.git")
+ f, err := fs.Open(fs.Join("worktree", ".git"))
c.Assert(err, IsNil)
all, err := ioutil.ReadAll(f)
c.Assert(err, IsNil)
- c.Assert(string(all), Equals, "gitdir: ../storage\n")
+ c.Assert(string(all), Equals, fmt.Sprintf("gitdir: %s\n", filepath.Join("..", "storage")))
cfg, err := r.Config()
c.Assert(err, IsNil)
- c.Assert(cfg.Core.Worktree, Equals, "../worktree")
+ c.Assert(cfg.Core.Worktree, Equals, filepath.Join("..", "worktree"))
}
func (s *RepositorySuite) TestInitStandardDotGit(c *C) {