MCPcopy Create free account
hub / github.com/github/gh-aw / TestUninstallBashCompletionNotFound

Function TestUninstallBashCompletionNotFound

pkg/cli/shell_completion_test.go:222–233  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

220}
221
222func TestUninstallBashCompletionNotFound(t *testing.T) {
223 // Create a temporary home directory without completion file
224 tmpDir := t.TempDir()
225 originalHome := os.Getenv("HOME")
226 defer os.Setenv("HOME", originalHome)
227 os.Setenv("HOME", tmpDir)
228
229 // Uninstall should fail when no file found
230 err := uninstallBashCompletion(false)
231 require.Error(t, err)
232 assert.Contains(t, err.Error(), "no bash completion file found")
233}
234
235func TestUninstallZshCompletion(t *testing.T) {
236 // Create a temporary home directory

Callers

nothing calls this directly

Calls 4

uninstallBashCompletionFunction · 0.85
GetenvMethod · 0.80
SetenvMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected