summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/cobra/bash_completions_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/spf13/cobra/bash_completions_test.go')
-rw-r--r--vendor/github.com/spf13/cobra/bash_completions_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/spf13/cobra/bash_completions_test.go b/vendor/github.com/spf13/cobra/bash_completions_test.go
index a0da87148..dd3a88efb 100644
--- a/vendor/github.com/spf13/cobra/bash_completions_test.go
+++ b/vendor/github.com/spf13/cobra/bash_completions_test.go
@@ -2,6 +2,7 @@ package cobra
import (
"bytes"
+ "fmt"
"os"
"os/exec"
"strings"
@@ -146,11 +147,11 @@ func TestBashCompletions(t *testing.T) {
// check for filename extension flags
check(t, output, `must_have_one_noun+=("three")`)
// check for filename extension flags
- check(t, output, `flags_completion+=("__handle_filename_extension_flag json|yaml|yml")`)
+ check(t, output, fmt.Sprintf(`flags_completion+=("__%s_handle_filename_extension_flag json|yaml|yml")`, rootCmd.Name()))
// check for custom flags
check(t, output, `flags_completion+=("__complete_custom")`)
// check for subdirs_in_dir flags
- check(t, output, `flags_completion+=("__handle_subdirs_in_dir_flag themes")`)
+ check(t, output, fmt.Sprintf(`flags_completion+=("__%s_handle_subdirs_in_dir_flag themes")`, rootCmd.Name()))
checkOmit(t, output, deprecatedCmd.Name())