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,
|
||||
},
|
||||
|
||||
{
|
||||
"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()}",
|
||||
&ast.BasicScope{
|
||||
|
|
Loading…
Reference in New Issue