forked from Silverfish/proton-bridge
feat(GODT-2666): feat(GODT-2667): introduce sessionID in bridge.
This commit is contained in:
@ -42,6 +42,23 @@ func TestRemoveFlagWithValue(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRemoveFlagsWithValue(t *testing.T) {
|
||||
tests := []struct {
|
||||
argList []string
|
||||
flags []string
|
||||
expected []string
|
||||
}{
|
||||
{[]string{}, []string{"a", "b"}, nil},
|
||||
{[]string{"-a", "-b=value", "-c"}, []string{"b"}, []string{"-a", "-c"}},
|
||||
{[]string{"-a", "--b=value", "-c"}, []string{"b", "c"}, []string{"-a"}},
|
||||
{[]string{"-a", "-b", "value", "-c"}, []string{"c", "b"}, []string{"-a"}},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
require.Equal(t, removeFlagsWithValue(tt.argList, tt.flags...), tt.expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRemoveFlag(t *testing.T) {
|
||||
tests := []struct {
|
||||
argList []string
|
||||
|
||||
Reference in New Issue
Block a user