MCPcopy Create free account
hub / github.com/alibaba/open-code-review / assertContainsInOrder

Function assertContainsInOrder

internal/tool/code_search_test.go:453–464  ·  view source on GitHub ↗
(t *testing.T, args []string, vals ...string)

Source from the content-addressed store, hash-verified

451}
452
453func assertContainsInOrder(t *testing.T, args []string, vals ...string) {
454 t.Helper()
455 idx := 0
456 for _, a := range args {
457 if idx < len(vals) && a == vals[idx] {
458 idx++
459 }
460 }
461 if idx != len(vals) {
462 t.Errorf("expected args to contain %v in order, got %v (matched up to index %d)", vals, args, idx)
463 }
464}
465
466func TestGitGrep_WorkspaceMode_UntrackedFile(t *testing.T) {
467 dir := setupTestRepo(t)

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected