(t *testing.T, args []string, vals ...string)
| 300 | } |
| 301 | |
| 302 | func assertContainsInOrder(t *testing.T, args []string, vals ...string) { |
| 303 | t.Helper() |
| 304 | idx := 0 |
| 305 | for _, a := range args { |
| 306 | if idx < len(vals) && a == vals[idx] { |
| 307 | idx++ |
| 308 | } |
| 309 | } |
| 310 | if idx != len(vals) { |
| 311 | t.Errorf("expected args to contain %v in order, got %v (matched up to index %d)", vals, args, idx) |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | func TestGitGrep_WorkspaceMode_UntrackedFile(t *testing.T) { |
| 316 | dir := setupTestRepo(t) |
no outgoing calls
no test coverage detected