Implements indexing with period identifier style (`foo.bar`)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -11,4 +11,18 @@ TEST_CASE( "String indexing", "[integration]" ) {
|
||||
delete script;
|
||||
}
|
||||
|
||||
TEST_CASE( "Identifier Index", "[integration]" ) {
|
||||
auto script = Script::Create(uR"(
|
||||
foo = {
|
||||
bar = "test"
|
||||
}
|
||||
return foo.bar
|
||||
)");
|
||||
REQUIRE(!script->Diagnostics -> HasErrors());
|
||||
auto result = script->Evaluate();
|
||||
REQUIRE(*result->EvaluateString() == u"test");
|
||||
delete script;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user