aboutsummaryrefslogtreecommitdiffstats
path: root/utils/merkletrie/filesystem/node_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-07-18 23:12:09 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-07-18 23:12:09 +0200
commitb22e7fa5a7bcd5492aaf9ec11f57cb4322eb8cb4 (patch)
tree921012dfdbadd6bec257a3f2edd22c27ffa702c3 /utils/merkletrie/filesystem/node_test.go
parentbebcb4f19a002ed2845baa9fbd725ac25b2e742c (diff)
downloadgo-git-b22e7fa5a7bcd5492aaf9ec11f57cb4322eb8cb4.tar.gz
utils: merkletrie fix test on windows
Diffstat (limited to 'utils/merkletrie/filesystem/node_test.go')
-rw-r--r--utils/merkletrie/filesystem/node_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/merkletrie/filesystem/node_test.go b/utils/merkletrie/filesystem/node_test.go
index bf1178a..6d764ab 100644
--- a/utils/merkletrie/filesystem/node_test.go
+++ b/utils/merkletrie/filesystem/node_test.go
@@ -4,6 +4,7 @@ import (
"bytes"
"io"
"os"
+ "path/filepath"
"testing"
. "gopkg.in/check.v1"
@@ -133,18 +134,19 @@ func (s *NoderSuite) TestDiffChangeModeNotRelevant(c *C) {
}
func (s *NoderSuite) TestDiffDirectory(c *C) {
+ dir := filepath.Join("qux", "bar")
fsA := memfs.New()
- fsA.MkdirAll("qux/bar", 0644)
+ fsA.MkdirAll(dir, 0644)
fsB := memfs.New()
- fsB.MkdirAll("qux/bar", 0644)
+ fsB.MkdirAll(dir, 0644)
ch, err := merkletrie.DiffTree(
NewRootNode(fsA, map[string]plumbing.Hash{
- "qux/bar": plumbing.NewHash("aa102815663d23f8b75a47e7a01965dcdc96468c"),
+ dir: plumbing.NewHash("aa102815663d23f8b75a47e7a01965dcdc96468c"),
}),
NewRootNode(fsB, map[string]plumbing.Hash{
- "qux/bar": plumbing.NewHash("19102815663d23f8b75a47e7a01965dcdc96468c"),
+ dir: plumbing.NewHash("19102815663d23f8b75a47e7a01965dcdc96468c"),
}),
IsEquals,
)