builtin-base.go: new eval() function
This commit is contained in:
@@ -56,11 +56,12 @@ func TestFuncBase(t *testing.T) {
|
||||
/* 42 */ {`dec(false)`, float64(0), nil},
|
||||
/* 43 */ {`dec(1:2)`, float64(0.5), nil},
|
||||
/* 44 */ {`dec([1])`, nil, `dec(): can't convert list to float`},
|
||||
/* 45 */ {`eval("a=3"); a`, int64(3), nil},
|
||||
// /* 45 */ {`string([1])`, nil, `string(): can't convert list to string`},
|
||||
}
|
||||
|
||||
t.Setenv("EXPR_PATH", ".")
|
||||
|
||||
// runTestSuiteSpec(t, section, inputs, 30)
|
||||
// runTestSuiteSpec(t, section, inputs, 45)
|
||||
runTestSuite(t, section, inputs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user