jinja : fix lexing of float literals with sign (#18901)
* fix lexing of float literals with sign * add test * consume_numeric
This commit is contained in:
parent
f55b033ae6
commit
420960ab92
2 changed files with 18 additions and 7 deletions
|
|
@ -247,6 +247,12 @@ static void test_expressions(testing & t) {
|
|||
"Bob"
|
||||
);
|
||||
|
||||
test_template(t, "negative float (not dot notation)",
|
||||
"{{ -1.0 }}",
|
||||
json::object(),
|
||||
"-1.0"
|
||||
);
|
||||
|
||||
test_template(t, "bracket notation",
|
||||
"{{ user['name'] }}",
|
||||
{{"user", {{"name", "Bob"}}}},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue