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

Function TestUninstallFishCompletionNotFound

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

Source from the content-addressed store, hash-verified

304}
305
306func TestUninstallFishCompletionNotFound(t *testing.T) {
307 // Create a temporary home directory without completion file
308 tmpDir := t.TempDir()
309 originalHome := os.Getenv("HOME")
310 defer os.Setenv("HOME", originalHome)
311 os.Setenv("HOME", tmpDir)
312
313 // Uninstall should fail when no file found
314 err := uninstallFishCompletion(false)
315 require.Error(t, err)
316 assert.Contains(t, err.Error(), "no fish completion file found")
317}
318
319func TestUninstallShellCompletion(t *testing.T) {
320 // Save original environment

Callers

nothing calls this directly

Calls 4

uninstallFishCompletionFunction · 0.85
GetenvMethod · 0.80
SetenvMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected