mirror of
https://github.com/spf13/viper
synced 2025-05-07 20:57:18 +00:00
fix: typo
This commit is contained in:
parent
ebcc662f66
commit
79492b67f8
1 changed files with 2 additions and 1 deletions
|
@ -2693,12 +2693,13 @@ func TestIsPathShadowedInFlatMap(t *testing.T) {
|
||||||
path1 := []string{"foo", "bar"}
|
path1 := []string{"foo", "bar"}
|
||||||
expected1 := "foo"
|
expected1 := "foo"
|
||||||
|
|
||||||
// "foo.bar" should shadowed by"foo"
|
// "foo.bar" should shadowed by "foo"
|
||||||
assert.Equal(t, expected1, v.isPathShadowedInFlatMap(path1, stringMap))
|
assert.Equal(t, expected1, v.isPathShadowedInFlatMap(path1, stringMap))
|
||||||
assert.Equal(t, expected1, v.isPathShadowedInFlatMap(path1, flagMap))
|
assert.Equal(t, expected1, v.isPathShadowedInFlatMap(path1, flagMap))
|
||||||
|
|
||||||
path2 := []string{"bar", "foo"}
|
path2 := []string{"bar", "foo"}
|
||||||
expected2 := ""
|
expected2 := ""
|
||||||
|
|
||||||
// "bar.foo" should not shadowed by "foo"
|
// "bar.foo" should not shadowed by "foo"
|
||||||
assert.Equal(t, expected2, v.isPathShadowedInFlatMap(path2, stringMap))
|
assert.Equal(t, expected2, v.isPathShadowedInFlatMap(path2, stringMap))
|
||||||
assert.Equal(t, expected2, v.isPathShadowedInFlatMap(path2, flagMap))
|
assert.Equal(t, expected2, v.isPathShadowedInFlatMap(path2, flagMap))
|
||||||
|
|
Loading…
Add table
Reference in a new issue