Skip to content

Commit be197da

Browse files
committed
completion: add test for NoComplete
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 5171319 commit be197da

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cli/command/completion/functions_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ func TestCompleteFromList(t *testing.T) {
3737
assert.Check(t, is.DeepEqual(values, expected))
3838
}
3939

40+
func TestCompleteNoComplete(t *testing.T) {
41+
values, directives := NoComplete(nil, nil, "")
42+
assert.Check(t, is.Equal(directives, cobra.ShellCompDirectiveNoFileComp))
43+
assert.Check(t, is.Len(values, 0))
44+
}
45+
4046
func TestCompletePlatforms(t *testing.T) {
4147
values, directives := Platforms(nil, nil, "")
4248
assert.Check(t, is.Equal(directives&cobra.ShellCompDirectiveNoFileComp, cobra.ShellCompDirectiveNoFileComp), "Should not perform file completion")

0 commit comments

Comments
 (0)