MCPcopy Index your code
hub / github.com/cheat/cheat / assertCommunityCommentedOut

Function assertCommunityCommentedOut

test/integration/first_run_integration_test.go:263–275  ·  view source on GitHub ↗

assertCommunityCommentedOut verifies that the community cheatpath entry is commented out (not active) in the config.

(t *testing.T, content string)

Source from the content-addressed store, hash-verified

261// assertCommunityCommentedOut verifies that the community cheatpath entry
262// is commented out (not active) in the config.
263func assertCommunityCommentedOut(t *testing.T, content string) {
264 t.Helper()
265 for _, line := range strings.Split(content, "\n") {
266 trimmed := strings.TrimSpace(line)
267 if trimmed == "- name: community" {
268 t.Error("community cheatpath should be commented out")
269 return
270 }
271 }
272 if !strings.Contains(content, "#- name: community") {
273 t.Error("expected commented-out community cheatpath")
274 }
275}
276
277// assertCheatpathActive verifies that a named cheatpath is present and
278// uncommented in the config.

Callers 1

TestFirstRunIntegrationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected