(c *C)
| 32 | var _ = Suite(&NoderSuite{}) |
| 33 | |
| 34 | func (s *NoderSuite) TestDiff(c *C) { |
| 35 | fsA := memfs.New() |
| 36 | WriteFile(fsA, "foo", []byte("foo"), 0644) |
| 37 | WriteFile(fsA, "qux/bar", []byte("foo"), 0644) |
| 38 | WriteFile(fsA, "qux/qux", []byte("foo"), 0644) |
| 39 | fsA.Symlink("foo", "bar") |
| 40 | |
| 41 | fsB := memfs.New() |
| 42 | WriteFile(fsB, "foo", []byte("foo"), 0644) |
| 43 | WriteFile(fsB, "qux/bar", []byte("foo"), 0644) |
| 44 | WriteFile(fsB, "qux/qux", []byte("foo"), 0644) |
| 45 | fsB.Symlink("foo", "bar") |
| 46 | |
| 47 | ch, err := merkletrie.DiffTree( |
| 48 | NewRootNode(fsA, nil), |
| 49 | NewRootNode(fsB, nil), |
| 50 | IsEquals, |
| 51 | ) |
| 52 | |
| 53 | c.Assert(err, IsNil) |
| 54 | c.Assert(ch, HasLen, 0) |
| 55 | } |
| 56 | |
| 57 | func (s *NoderSuite) TestDiffChangeLink(c *C) { |
| 58 | fsA := memfs.New() |
nothing calls this directly
no test coverage detected