diff --git a/cli/command/completion/functions_test.go b/cli/command/completion/functions_test.go index 7a98e2d3c9..f522753930 100644 --- a/cli/command/completion/functions_test.go +++ b/cli/command/completion/functions_test.go @@ -37,6 +37,12 @@ func TestCompleteFromList(t *testing.T) { assert.Check(t, is.DeepEqual(values, expected)) } +func TestCompleteNoComplete(t *testing.T) { + values, directives := NoComplete(nil, nil, "") + assert.Check(t, is.Equal(directives, cobra.ShellCompDirectiveNoFileComp)) + assert.Check(t, is.Len(values, 0)) +} + func TestCompletePlatforms(t *testing.T) { values, directives := Platforms(nil, nil, "") assert.Check(t, is.Equal(directives&cobra.ShellCompDirectiveNoFileComp, cobra.ShellCompDirectiveNoFileComp), "Should not perform file completion")