mirror of https://github.com/spf13/viper.git
Adding some test cases for deep aliases.
This commit is contained in:
parent
df68c0ac38
commit
0b15bed35b
|
@ -218,3 +218,13 @@ func TestDeepAutomaticEnv(t *testing.T) {
|
|||
os.Setenv("CLOTHING__JACKET", "jean")
|
||||
assert.Equal(t, "jean", Get("clothing.jacket"))
|
||||
}
|
||||
|
||||
func TestDeepAlias(t *testing.T) {
|
||||
RegisterAlias("jacket", "clothing.jacket")
|
||||
assert.Equal(t, "jean", Get("jacket"))
|
||||
}
|
||||
|
||||
func TestDeepAliasCase(t *testing.T) {
|
||||
RegisterAlias("jacket", "clothing.Jacket")
|
||||
assert.Equal(t, "jean", Get("jacket"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue