feat(test): Adapt completion tests to Cobra 1.1

Cobra 1.1 trims completions so we need to remove extra spaces from
the tests.

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
pull/8928/head
Marc Khouzam 5 years ago committed by Marc Khouzam
parent 713ec751a3
commit 82f739072c

@ -1,6 +1,6 @@
plugin.complete was called plugin.complete was called
Namespace: default Namespace: default
Num args received: 1 Num args received: 1
Args received: Args received:
:4 :4
Completion ended with directive: ShellCompDirectiveNoFileComp Completion ended with directive: ShellCompDirectiveNoFileComp

@ -1,6 +1,6 @@
plugin.complete was called plugin.complete was called
Namespace: default Namespace: default
Num args received: 2 Num args received: 2
Args received: --myflag Args received: --myflag
:4 :4
Completion ended with directive: ShellCompDirectiveNoFileComp Completion ended with directive: ShellCompDirectiveNoFileComp

@ -1,6 +1,6 @@
plugin.complete was called plugin.complete was called
Namespace: mynamespace Namespace: mynamespace
Num args received: 1 Num args received: 1
Args received: Args received:
:2 :2
Completion ended with directive: ShellCompDirectiveNoSpace Completion ended with directive: ShellCompDirectiveNoSpace

@ -1,6 +1,6 @@
echo plugin.complete was called echo plugin.complete was called
Namespace: default Namespace: default
Num args received: 1 Num args received: 1
Args received: Args received:
:0 :0
Completion ended with directive: ShellCompDirectiveDefault Completion ended with directive: ShellCompDirectiveDefault

@ -1,6 +1,6 @@
echo plugin.complete was called echo plugin.complete was called
Namespace: mynamespace Namespace: mynamespace
Num args received: 1 Num args received: 1
Args received: Args received:
:0 :0
Completion ended with directive: ShellCompDirectiveDefault Completion ended with directive: ShellCompDirectiveDefault

Loading…
Cancel
Save