(t *testing.T)
| 30 | } |
| 31 | |
| 32 | func TestEmptyValue(t *testing.T) { |
| 33 | t.Setenv("TEST_INT", "") |
| 34 | |
| 35 | desc := env.Int("TEST_INT") |
| 36 | result := 123 // existing value |
| 37 | err := desc.Parse(&result) |
| 38 | |
| 39 | require.NoError(t, err) |
| 40 | assert.Equal(t, 123, result) // value should not change |
| 41 | } |
| 42 | |
| 43 | func TestParseFailure(t *testing.T) { |
| 44 | t.Setenv("TEST_INT", "not_a_number") |