(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestStatusNothing(t *testing.T) { |
| 66 | t.Parallel() |
| 67 | repo := createTestRepo(t) |
| 68 | defer cleanupTestRepo(t, repo) |
| 69 | |
| 70 | seedTestRepo(t, repo) |
| 71 | |
| 72 | opts := &StatusOptions{ |
| 73 | Show: StatusShowIndexAndWorkdir, |
| 74 | Flags: StatusOptIncludeUntracked | StatusOptRenamesHeadToIndex | StatusOptSortCaseSensitively, |
| 75 | } |
| 76 | |
| 77 | statusList, err := repo.StatusList(opts) |
| 78 | checkFatal(t, err) |
| 79 | |
| 80 | entryCount, err := statusList.EntryCount() |
| 81 | checkFatal(t, err) |
| 82 | |
| 83 | if entryCount != 0 { |
| 84 | t.Fatal("expected no statuses in empty repo") |
| 85 | } |
| 86 | |
| 87 | _, err = statusList.ByIndex(0) |
| 88 | if err == nil { |
| 89 | t.Error("expected error getting status by index") |
| 90 | } |
| 91 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…