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

Function TestBuildGrepArgs_FixedString

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

Source from the content-addressed store, hash-verified

94}
95
96func TestBuildGrepArgs_FixedString(t *testing.T) {
97 p := NewCodeSearch(&FileReader{RepoDir: "/tmp", Ref: ""})
98 args := p.buildGrepArgs("foo", false, false, false, nil)
99
100 assertContains(t, args, "-F")
101 assertNotContains(t, args, "-E")
102 assertNotContains(t, args, "-P")
103}
104
105func setupTestRepo(t *testing.T) string {
106 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