MCPcopy Create free account
hub / github.com/go-git/go-git / TestMoveNotExistentEntry

Method TestMoveNotExistentEntry

worktree_test.go:2293–2306  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

2291}
2292
2293func (s *WorktreeSuite) TestMoveNotExistentEntry(c *C) {
2294 fs := memfs.New()
2295 w := &Worktree{
2296 r: s.Repository,
2297 Filesystem: fs,
2298 }
2299
2300 err := w.Checkout(&CheckoutOptions{Force: true})
2301 c.Assert(err, IsNil)
2302
2303 hash, err := w.Move("not-exists", "foo")
2304 c.Assert(hash.IsZero(), Equals, true)
2305 c.Assert(err, NotNil)
2306}
2307
2308func (s *WorktreeSuite) TestMoveToExistent(c *C) {
2309 fs := memfs.New()

Callers

nothing calls this directly

Calls 3

CheckoutMethod · 0.95
MoveMethod · 0.95
IsZeroMethod · 0.65

Tested by

no test coverage detected