(t *testing.T)
| 1587 | } |
| 1588 | |
| 1589 | func TestExpr_map_default_values_compile_check(t *testing.T) { |
| 1590 | tests := []struct { |
| 1591 | env any |
| 1592 | input string |
| 1593 | }{ |
| 1594 | { |
| 1595 | mock.MapStringStringEnv{"foo": "bar"}, |
| 1596 | `Split(foo, sep)`, |
| 1597 | }, |
| 1598 | { |
| 1599 | mock.MapStringIntEnv{"foo": 1}, |
| 1600 | `foo / bar`, |
| 1601 | }, |
| 1602 | } |
| 1603 | for _, tt := range tests { |
| 1604 | _, err := expr.Compile(tt.input, expr.Env(tt.env), expr.AllowUndefinedVariables()) |
| 1605 | require.NoError(t, err) |
| 1606 | } |
| 1607 | } |
| 1608 | |
| 1609 | func TestExpr_calls_with_nil(t *testing.T) { |
| 1610 | env := map[string]any{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…