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

Function assertContainsInOrder

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

Source from the content-addressed store, hash-verified

300}
301
302func 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
315func TestGitGrep_WorkspaceMode_UntrackedFile(t *testing.T) {
316 dir := setupTestRepo(t)

Calls

no outgoing calls

Tested by

no test coverage detected