mirror of
https://github.com/restic/restic.git
synced 2026-10-13 05:27:13 +00:00
Refactor repository structure
Merge Map data type into Tree.
This commit is contained in:
1 parent
bdcdcdea7d
commit
203a911de9
26 files changed
+939
-681
No files matched your search
@@ -76,3 +76,17 @@ func TestNodeMarshal(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestNodeComparison(t *testing.T) {
|
||||
fi, err := os.Lstat("tree_test.go")
|
||||
ok(t, err)
|
||||
|
||||
node, err := restic.NodeFromFileInfo("foo", fi)
|
||||
ok(t, err)
|
||||
|
||||
n2 := *node
|
||||
assert(t, node.Equals(n2), "nodes aren't equal")
|
||||
|
||||
n2.Size -= 1
|
||||
assert(t, !node.Equals(n2), "nodes are equal")
|
||||
}
|
||||
Reference in new issue
Block a user