mirror of
https://github.com/pantor/inja.git
synced 2026-10-17 17:28:14 +00:00
Allow index in nested loops
This commit is contained in:
1 parent
776af96b0b
commit
1766793fd5
2 files changed
+8
No files matched your search
@@ -59,6 +59,7 @@ TEST_CASE("types") {
|
||||
|
||||
data["empty_loop"] = {};
|
||||
CHECK( env.render("{% for name in empty_loop %}a{% endfor %}", data) == "" );
|
||||
CHECK( env.render("{% for name in {} %}a{% endfor %}", data) == "" );
|
||||
|
||||
CHECK_THROWS_WITH( env.render("{% for name ins names %}a{% endfor %}", data), "[inja.exception.parser_error] unknown loop statement: for name ins names" );
|
||||
// CHECK_THROWS_WITH( env.render("{% for name in relatives %}{{ name }}{% endfor %}", data), "[inja.exception.json_error] [json.exception.type_error.302] type must be array, but is object" );
|
||||
|
||||
Reference in new issue
Block a user