(t *testing.T)
| 21 | } |
| 22 | |
| 23 | func TestNewLoaderWithOptions(t *testing.T) { |
| 24 | loader := NewLoader( |
| 25 | WithEnvExpansion(false), |
| 26 | WithEnvPrefix("TEST_"), |
| 27 | WithVariables(map[string]string{ |
| 28 | "custom_var": "custom_value", |
| 29 | }), |
| 30 | ) |
| 31 | |
| 32 | if loader.expandEnv { |
| 33 | t.Error("expected expandEnv to be false") |
| 34 | } |
| 35 | if loader.envPrefix != "TEST_" { |
| 36 | t.Errorf("expected envPrefix 'TEST_', got %q", loader.envPrefix) |
| 37 | } |
| 38 | if loader.variables["custom_var"] != "custom_value" { |
| 39 | t.Errorf("expected custom_var to be 'custom_value', got %q", loader.variables["custom_var"]) |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | func TestExpandVariables(t *testing.T) { |
| 44 | // Set test environment variables |
nothing calls this directly
no test coverage detected