(t *testing.T)
| 822 | } |
| 823 | |
| 824 | func TestAllKeysWithEnv(t *testing.T) { |
| 825 | v := New() |
| 826 | |
| 827 | // bind and define environment variables (including a nested one) |
| 828 | v.BindEnv("id") |
| 829 | v.BindEnv("foo.bar") |
| 830 | v.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) |
| 831 | |
| 832 | t.Setenv("ID", "13") |
| 833 | t.Setenv("FOO_BAR", "baz") |
| 834 | |
| 835 | assert.ElementsMatch(t, []string{"id", "foo.bar"}, v.AllKeys()) |
| 836 | } |
| 837 | |
| 838 | func TestAliasesOfAliases(t *testing.T) { |
| 839 | v := New() |
nothing calls this directly
no test coverage detected