replace test hardcode with defaultSliceFlagSeparator
@@ -3408,13 +3408,14 @@ func TestFlagSplitMultiValues_Disabled(t *testing.T) {
defer func() {
disableSliceFlagSeparator = false
}()
+
opts := []string{"opt1", "opt2", "opt3,op", "opt4"}
- ret := flagSplitMultiValues(strings.Join(opts, ","))
+ ret := flagSplitMultiValues(strings.Join(opts, defaultSliceFlagSeparator))
if len(ret) != 1 {
t.Fatalf("failed to disable split slice flag, want: 1, but got: %d", len(ret))
}
- if ret[0] != strings.Join(opts, ",") {
- t.Fatalf("failed to disable split slice flag, want: %s, but got: %s", strings.Join(opts, ","), ret[0])
+ if ret[0] != strings.Join(opts, defaultSliceFlagSeparator) {
+ t.Fatalf("failed to disable split slice flag, want: %s, but got: %s", strings.Join(opts, defaultSliceFlagSeparator), ret[0])
}
}
