Fixes for creating variable in local scope

This commit is contained in:
2019-05-29 15:10:16 +02:00
parent 188d89db94
commit bda561b775
4 changed files with 20 additions and 5 deletions

View File

@@ -14,5 +14,12 @@ TEST_CASE( "Create script variable", "[integration]" ) {
delete script;
}
TEST_CASE( "Create local variable", "[integration]" ) {
Script* script = Script::Create("local foo = true");
REQUIRE(!script->Diagnostics -> HasErrors());
REQUIRE_FALSE(script->HasVariable("foo"));
script->Evaluate();
delete script;
}
#endif