From 0b15bed35b3dde2537542c68232d4bb43add740f Mon Sep 17 00:00:00 2001 From: jacobstr Date: Thu, 23 Oct 2014 21:46:46 -0600 Subject: [PATCH] Adding some test cases for deep aliases. --- viper_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/viper_test.go b/viper_test.go index a7dfece..33976cd 100644 --- a/viper_test.go +++ b/viper_test.go @@ -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")) +}