(c *C)
| 2291 | } |
| 2292 | |
| 2293 | func (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 | |
| 2308 | func (s *WorktreeSuite) TestMoveToExistent(c *C) { |
| 2309 | fs := memfs.New() |