common/collections: Fix append regression to allow appending nil

Closes #11180
This commit is contained in:
khayyam
2023-06-28 03:41:36 -04:00
committed by GitHub
parent 793e38f5ce
commit b74b8d6478
3 changed files with 72 additions and 1 deletions

View File

@@ -74,6 +74,9 @@ func TestAppend(t *testing.T) {
[]any{"c"},
false,
},
{[]string{"a", "b"}, []any{nil}, []any{"a", "b", nil}},
{[]string{"a", "b"}, []any{nil, "d", nil}, []any{"a", "b", nil, "d", nil}},
{[]any{"a", nil, "c"}, []any{"d", nil, "f"}, []any{"a", nil, "c", "d", nil, "f"}},
} {
result, err := Append(test.start, test.addend...)