jinja : support dot property integer literals (#28817)

This commit is contained in:
Sigbjørn Skjæret
2026-09-12 23:49:53 +03:00
committed by GitHub
parent 737e0980fe
commit ae9afff8d2
2 changed files with 18 additions and 0 deletions
+12
View File
@@ -398,6 +398,18 @@ static void test_expressions(testing & t) {
"Bob"
);
test_template(t, "dot notation (integer property)",
"{{ {10: 'Bob'}.10 }}",
json::object(),
"Bob"
);
test_template(t, "dot notation (array index)",
"{{ user.10 }}",
{{"user", json::array({"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"})}},
"k"
);
test_template(t, "negative float (not dot notation)",
"{{ -1.0 }}",
json::object(),