mirror of https://github.com/Icinga/icinga2.git
parent
e86b36f8d7
commit
5324b99fd0
|
@ -239,11 +239,11 @@ BOOST_AUTO_TEST_CASE(advanced)
|
|||
expr = ConfigCompiler::CompileText("<test>", "a = 3 b = 3");
|
||||
BOOST_CHECK_THROW(expr->Evaluate(frame), ScriptError);
|
||||
|
||||
expr = ConfigCompiler::CompileText("<test>", "__function() { 3 }()");
|
||||
expr = ConfigCompiler::CompileText("<test>", "function() { 3 }()");
|
||||
BOOST_CHECK(expr->Evaluate(frame) == 3);
|
||||
delete expr;
|
||||
|
||||
expr = ConfigCompiler::CompileText("<test>", "__function() { __return 3, 5 }()");
|
||||
expr = ConfigCompiler::CompileText("<test>", "function() { return 3, 5 }()");
|
||||
BOOST_CHECK(expr->Evaluate(frame) == 3);
|
||||
delete expr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue