From 6750318bb50bb6e21eb9d3247acd0d71acdca3a4 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 26 Feb 2015 14:34:45 -0800 Subject: [PATCH] config/lang: add test with expressions --- config/lang/eval_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config/lang/eval_test.go b/config/lang/eval_test.go index 3446be9d2d..6af2c714b1 100644 --- a/config/lang/eval_test.go +++ b/config/lang/eval_test.go @@ -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{