diff options
Diffstat (limited to 'common/maps/maps_test.go')
-rw-r--r-- | common/maps/maps_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/common/maps/maps_test.go b/common/maps/maps_test.go index 53120dce7..0b84d2dd7 100644 --- a/common/maps/maps_test.go +++ b/common/maps/maps_test.go @@ -171,3 +171,26 @@ func TestRenameKeys(t *testing.T) { t.Errorf("Expected\n%#v, got\n%#v\n", expected, m) } } + +func TestLookupEqualFold(t *testing.T) { + c := qt.New(t) + + m1 := map[string]any{ + "a": "av", + "B": "bv", + } + + v, found := LookupEqualFold(m1, "b") + c.Assert(found, qt.IsTrue) + c.Assert(v, qt.Equals, "bv") + + m2 := map[string]string{ + "a": "av", + "B": "bv", + } + + v, found = LookupEqualFold(m2, "b") + c.Assert(found, qt.IsTrue) + c.Assert(v, qt.Equals, "bv") + +} |