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

Function TestBuildGrepArgs_FixedString

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

Source from the content-addressed store, hash-verified

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