(c *C, marker string, w *Worktree, files []string, statuses []FileStatus)
| 3345 | } |
| 3346 | |
| 3347 | func verifyStatus(c *C, marker string, w *Worktree, files []string, statuses []FileStatus) { |
| 3348 | c.Assert(len(files), Equals, len(statuses)) |
| 3349 | |
| 3350 | status, err := w.Status() |
| 3351 | c.Assert(err, IsNil) |
| 3352 | |
| 3353 | for i, file := range files { |
| 3354 | current := status.File(file) |
| 3355 | expected := statuses[i] |
| 3356 | c.Assert(current.Worktree, Equals, expected.Worktree, Commentf("%s - [%d] : %s Worktree %s != %s", marker, i, file, statusCodeNames[current.Worktree], statusCodeNames[expected.Worktree])) |
| 3357 | c.Assert(current.Staging, Equals, expected.Staging, Commentf("%s - [%d] : %s Staging %s != %s", marker, i, file, statusCodeNames[current.Staging], statusCodeNames[expected.Staging])) |
| 3358 | } |
| 3359 | } |
| 3360 | |
| 3361 | func (s *WorktreeSuite) TestRestoreStaged(c *C) { |
| 3362 | fs, w, names := setupForRestore(c, s) |
no test coverage detected
searching dependent graphs…