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

Function TestBuildGrepArgs_FixedString

internal/tool/code_search_test.go:79–86  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestBuildGrepArgs_FixedString(t *testing.T) {
80 p := NewCodeSearch(&FileReader{RepoDir: "/tmp", Ref: ""})
81 args := p.buildGrepArgs("foo", false, false, false, nil)
82
83 assertContains(t, args, "-F")
84 assertNotContains(t, args, "-E")
85 assertNotContains(t, args, "-P")
86}
87
88func setupTestRepo(t *testing.T) string {
89 t.Helper()

Callers

nothing calls this directly

Calls 4

NewCodeSearchFunction · 0.85
assertContainsFunction · 0.85
assertNotContainsFunction · 0.85
buildGrepArgsMethod · 0.80

Tested by

no test coverage detected