tpl/compare: Fix eq when > 2 args

Fixes #6786
This commit is contained in:
Bjørn Erik Pedersen
2020-01-23 10:48:28 +01:00
parent 0c251be66b
commit 2fefc01606
2 changed files with 11 additions and 2 deletions

View File

@@ -275,6 +275,9 @@ func TestEqualExtend(t *testing.T) {
{1, []interface{}{1, 2}, true},
{1, []interface{}{2, 1}, true},
{1, []interface{}{2, 3}, false},
{tstEqerType1("a"), []interface{}{tstEqerType1("a"), tstEqerType1("b")}, true},
{tstEqerType1("a"), []interface{}{tstEqerType1("b"), tstEqerType1("a")}, true},
{tstEqerType1("a"), []interface{}{tstEqerType1("b"), tstEqerType1("c")}, false},
} {
result := ns.Eq(test.first, test.others...)