MCPcopy
hub / github.com/go-git/go-git / TestDiffSymlinkDirOnA

Method TestDiffSymlinkDirOnA

utils/merkletrie/filesystem/node_test.go:95–111  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

93}
94
95func (s *NoderSuite) TestDiffSymlinkDirOnA(c *C) {
96 fsA := memfs.New()
97 WriteFile(fsA, "qux/qux", []byte("foo"), 0644)
98
99 fsB := memfs.New()
100 fsB.Symlink("qux", "foo")
101 WriteFile(fsB, "qux/qux", []byte("foo"), 0644)
102
103 ch, err := merkletrie.DiffTree(
104 NewRootNode(fsA, nil),
105 NewRootNode(fsB, nil),
106 IsEquals,
107 )
108
109 c.Assert(err, IsNil)
110 c.Assert(ch, HasLen, 1)
111}
112
113func (s *NoderSuite) TestDiffSymlinkDirOnB(c *C) {
114 fsA := memfs.New()

Callers

nothing calls this directly

Calls 4

DiffTreeFunction · 0.92
WriteFileFunction · 0.85
NewRootNodeFunction · 0.70
SymlinkMethod · 0.45

Tested by

no test coverage detected