mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
config/lang: add test with expressions
This commit is contained in:
parent
9ddcaf15eb
commit
6750318bb5
@ -95,6 +95,21 @@ func TestEval(t *testing.T) {
|
|||||||
ast.TypeString,
|
ast.TypeString,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"foo ${bar+1}",
|
||||||
|
&ast.BasicScope{
|
||||||
|
VarMap: map[string]ast.Variable{
|
||||||
|
"bar": ast.Variable{
|
||||||
|
Value: 41,
|
||||||
|
Type: ast.TypeInt,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
false,
|
||||||
|
"foo 42",
|
||||||
|
ast.TypeString,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"foo ${rand()}",
|
"foo ${rand()}",
|
||||||
&ast.BasicScope{
|
&ast.BasicScope{
|
||||||
|
Loading…
Reference in New Issue
Block a user