diff options
author | Santiago M. Mola <santi@mola.io> | 2017-04-28 17:13:02 +0200 |
---|---|---|
committer | Santiago M. Mola <santi@mola.io> | 2017-06-02 16:41:37 +0200 |
commit | 37f1ad489933c5460b4caf99d47dd66c3183ebd1 (patch) | |
tree | d30cede62d6424537de203367f06c1ec3026604a | |
parent | 8670235d5eb85f9f8d7f933d9b26b7230590f6d6 (diff) | |
download | go-git-37f1ad489933c5460b4caf99d47dd66c3183ebd1.tar.gz |
test: fix path handling in tests for Windows
-rw-r--r-- | repository_test.go | 6 |
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) { |