mirror of https://github.com/docker/cli.git
completion: add test for FileNames
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a5ca5b33f1
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
7d1fa132fb
commit
954dba4482
|
@ -23,6 +23,12 @@ func TestCompleteEnvVarNames(t *testing.T) {
|
||||||
assert.Check(t, is.DeepEqual(values, expected))
|
assert.Check(t, is.DeepEqual(values, expected))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestCompleteFileNames(t *testing.T) {
|
||||||
|
values, directives := FileNames(nil, nil, "")
|
||||||
|
assert.Check(t, is.Equal(directives, cobra.ShellCompDirectiveDefault))
|
||||||
|
assert.Check(t, is.Len(values, 0))
|
||||||
|
}
|
||||||
|
|
||||||
func TestCompletePlatforms(t *testing.T) {
|
func TestCompletePlatforms(t *testing.T) {
|
||||||
values, directives := Platforms(nil, nil, "")
|
values, directives := Platforms(nil, nil, "")
|
||||||
assert.Check(t, is.Equal(directives&cobra.ShellCompDirectiveNoFileComp, cobra.ShellCompDirectiveNoFileComp), "Should not perform file completion")
|
assert.Check(t, is.Equal(directives&cobra.ShellCompDirectiveNoFileComp, cobra.ShellCompDirectiveNoFileComp), "Should not perform file completion")
|
||||||
|
|
Loading…
Reference in New Issue