(t *testing.T, args []string, vals ...string)
| 316 | } |
| 317 | |
| 318 | func assertContainsInOrder(t *testing.T, args []string, vals ...string) { |
| 319 | t.Helper() |
| 320 | idx := 0 |
| 321 | for _, a := range args { |
| 322 | if idx < len(vals) && a == vals[idx] { |
| 323 | idx++ |
| 324 | } |
| 325 | } |
| 326 | if idx != len(vals) { |
| 327 | t.Errorf("expected args to contain %v in order, got %v (matched up to index %d)", vals, args, idx) |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | func TestGitGrep_WorkspaceMode_UntrackedFile(t *testing.T) { |
| 332 | dir := setupTestRepo(t) |
no outgoing calls
no test coverage detected