MCPcopy Index your code
hub / github.com/go-git/go-git / TestMoveNotExistentEntry

Method TestMoveNotExistentEntry

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

Source from the content-addressed store, hash-verified

2548}
2549
2550func (s *WorktreeSuite) TestMoveNotExistentEntry(c *C) {
2551 fs := memfs.New()
2552 w := &Worktree{
2553 r: s.Repository,
2554 Filesystem: fs,
2555 }
2556
2557 err := w.Checkout(&CheckoutOptions{Force: true})
2558 c.Assert(err, IsNil)
2559
2560 hash, err := w.Move("not-exists", "foo")
2561 c.Assert(hash.IsZero(), Equals, true)
2562 c.Assert(err, NotNil)
2563}
2564
2565func (s *WorktreeSuite) TestMoveToExistent(c *C) {
2566 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