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

Function assertContainsInOrder

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

Source from the content-addressed store, hash-verified

316}
317
318func 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
331func TestGitGrep_WorkspaceMode_UntrackedFile(t *testing.T) {
332 dir := setupTestRepo(t)

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected