-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace cramped test output with escaped newlines for better readability
- Loading branch information
1 parent
1635d86
commit c6d002f
Showing
83 changed files
with
733 additions
and
228 deletions.
There are no files selected for viewing
16 changes: 11 additions & 5 deletions
16
src/test/resources/eager/allows-deferred-lazy-reference-to-get-overridden.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
{% set a_list = ['a', 'b'] %}{% for __ignored__ in [0] %} | ||
{% set b_list = a_list %}{% if deferred %} | ||
{% set a_list = ['a', 'b'] %}\ | ||
{% for __ignored__ in [0] %} | ||
{% set b_list = a_list %}\ | ||
{% if deferred %} | ||
{% set b_list = [deferred] %} | ||
{% endif %}{% do b_list.append(deferred ? 'B' : '') %} | ||
B: {{ b_list }}.{% endfor %}{% do a_list.append(deferred ? 'A' : '') %} | ||
A: {{ a_list }}. | ||
{% endif %}\ | ||
{% do b_list.append(deferred ? 'B' : '') %} | ||
B: {{ b_list }}\ | ||
.{% endfor %}\ | ||
{% do a_list.append(deferred ? 'A' : '') %} | ||
A: {{ a_list }}\ | ||
. |
6 changes: 4 additions & 2 deletions
6
src/test/resources/eager/allows-meta-context-var-overriding.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
0 | ||
META | ||
{% for meta in deferred %} | ||
{{ meta }}{% endfor %} | ||
{{ meta }}\ | ||
{% endfor %} | ||
META | ||
{% set meta = [] %}{% if deferred %} | ||
{% set meta = [] %}\ | ||
{% if deferred %} | ||
{% do meta.append(1) %} | ||
{% endif %} | ||
{{ meta }} |
18 changes: 14 additions & 4 deletions
18
src/test/resources/eager/allows-variable-sharing-alias-name.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
{% do %}{% set current_path = 'filters.jinja' %}{% set __temp_import_alias_854547461__ = {} %}{% for __ignored__ in [0] %} | ||
{% set bar = deferred %}{% do __temp_import_alias_854547461__.update({'bar': bar}) %} | ||
{% do %}\ | ||
{% set current_path = 'filters.jinja' %}\ | ||
{% set __temp_import_alias_854547461__ = {} %}\ | ||
{% for __ignored__ in [0] %} | ||
{% set bar = deferred %}\ | ||
{% do __temp_import_alias_854547461__.update({'bar': bar}) %} | ||
|
||
{% set filters = {} %}{% do __temp_import_alias_854547461__.update({'filters': filters}) %}{% do filters.update(deferred) %} | ||
{% do __temp_import_alias_854547461__.update({'bar': bar,'foo': 123,'import_resource_path': 'filters.jinja','filters': filters}) %}{% endfor %}{% set filters = __temp_import_alias_854547461__ %}{% set current_path = '' %}{% enddo %} | ||
{% set filters = {} %}\ | ||
{% do __temp_import_alias_854547461__.update({'filters': filters}) %}\ | ||
{% do filters.update(deferred) %} | ||
{% do __temp_import_alias_854547461__.update({'bar': bar,'foo': 123,'import_resource_path': 'filters.jinja','filters': filters}) %}\ | ||
{% endfor %}\ | ||
{% set filters = __temp_import_alias_854547461__ %}\ | ||
{% set current_path = '' %}\ | ||
{% enddo %} | ||
|
||
{{ filters }} |
8 changes: 6 additions & 2 deletions
8
...test/resources/eager/commits-variables-from-do-tag-when-partially-resolved.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/test/resources/eager/correctly-defers-with-multiple-loops.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
src/test/resources/eager/defers-call-tag-with-deferred-argument.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
{% macro repeat(val) %} | ||
{{ val }} | ||
{{ caller() }} | ||
{% endmacro %}{% call repeat(deferred) %} | ||
{% endmacro %}\ | ||
{% call repeat(deferred) %} | ||
macro 1 | ||
{% macro repeat(val) %} | ||
{{ val }} | ||
{{ caller() }} | ||
{% endmacro %}{% call repeat(deferred + 1) %} | ||
{% endmacro %}\ | ||
{% call repeat(deferred + 1) %} | ||
macro2 | ||
{% endcall %} | ||
{% endcall %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Jack says: | ||
How do I get a {{ deferred }}? | ||
How do I get a {{ deferred }}\ | ||
? |
8 changes: 6 additions & 2 deletions
8
src/test/resources/eager/defers-changes-within-deferred-set-block.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
1 | ||
{% set bar = [1] %}{% set foo = '1' %}{% if deferred %} | ||
{% set foo %}2{% do bar.append(2) %}{% endset %} | ||
{% set bar = [1] %}\ | ||
{% set foo = '1' %}\ | ||
{% if deferred %} | ||
{% set foo %}\ | ||
2{% do bar.append(2) %}\ | ||
{% endset %} | ||
{% endif %} | ||
Bar: {{ bar }} | ||
Foo: {{ foo }} |
16 changes: 14 additions & 2 deletions
16
src/test/resources/eager/defers-loop-setting-meta-context-var.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
{% for __ignored__ in [0] %} | ||
{% macro render(content, query) %}{% if query %}{{ content.foo }}{% endif %}{% endmacro %}{% set content = {'foo': 'a'} %}{{ render(content, deferred) }} | ||
{% macro render(content, query) %}\ | ||
{% if query %}\ | ||
{{ content.foo }}\ | ||
{% endif %}\ | ||
{% endmacro %}\ | ||
{% set content = {'foo': 'a'} %}\ | ||
{{ render(content, deferred) }} | ||
|
||
{% macro render(content, query) %}{% if query %}{{ content.foo }}{% endif %}{% endmacro %}{% set content = {'foo': 'b'} %}{{ render(content, deferred) }} | ||
{% macro render(content, query) %}\ | ||
{% if query %}\ | ||
{{ content.foo }}\ | ||
{% endif %}\ | ||
{% endmacro %}\ | ||
{% set content = {'foo': 'b'} %}\ | ||
{{ render(content, deferred) }} | ||
{% endfor %} |
16 changes: 13 additions & 3 deletions
16
src/test/resources/eager/defers-macro-for-do-and-print.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
Is ([]), | ||
Macro: [10] | ||
Is ([10]),{% set my_list = [10] %}{% macro macro_append(num) %}{% do my_list.append(num) %}Macro: {{ my_list }}{% endmacro %}{% do macro_append(deferred) %} | ||
Is ({{ my_list }}), | ||
{% macro macro_append(num) %}{% do my_list.append(num) %}Macro: {{ my_list }}{% endmacro %}{% print macro_append(deferred2) %} | ||
Is ([10]),{% set my_list = [10] %}\ | ||
{% macro macro_append(num) %}\ | ||
{% do my_list.append(num) %}\ | ||
Macro: {{ my_list }}\ | ||
{% endmacro %}\ | ||
{% do macro_append(deferred) %} | ||
Is ({{ my_list }}\ | ||
), | ||
{% macro macro_append(num) %}\ | ||
{% do my_list.append(num) %}\ | ||
Macro: {{ my_list }}\ | ||
{% endmacro %}\ | ||
{% print macro_append(deferred2) %} |
11 changes: 9 additions & 2 deletions
11
src/test/resources/eager/defers-macro-in-expression.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
2 | ||
{% macro plus(foo, add) %}{{ foo + (filter:int.filter(add, ____int3rpr3t3r____)) }}{% endmacro %}{{ plus(deferred, 1.1) }}{% set deferred = deferred + 2 %} | ||
{% macro plus(foo, add) %}{{ foo + (filter:int.filter(add, ____int3rpr3t3r____)) }}{% endmacro %}{{ plus(deferred, 3.1) }} | ||
{% macro plus(foo, add) %}\ | ||
{{ foo + (filter:int.filter(add, ____int3rpr3t3r____)) }}\ | ||
{% endmacro %}\ | ||
{{ plus(deferred, 1.1) }}\ | ||
{% set deferred = deferred + 2 %} | ||
{% macro plus(foo, add) %}\ | ||
{{ foo + (filter:int.filter(add, ____int3rpr3t3r____)) }}\ | ||
{% endmacro %}\ | ||
{{ plus(deferred, 3.1) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{% set my_list = [] %}{% macro macro_append(num) %}{% do my_list.append(num) %}{{ my_list }}{% endmacro %}{% for item in filter:split.filter(macro_append(deferred), ____int3rpr3t3r____, ',', 2) %} | ||
{% set my_list = [] %}\ | ||
{% macro macro_append(num) %}\ | ||
{% do my_list.append(num) %}\ | ||
{{ my_list }}\ | ||
{% endmacro %}\ | ||
{% for item in filter:split.filter(macro_append(deferred), ____int3rpr3t3r____, ',', 2) %} | ||
{{ item }} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{% set my_list = [] %}{% macro macro_append(num) %}{% do my_list.append(num) %}{{ my_list }}{% endmacro %}{% if [] == filter:split.filter(macro_append(deferred), ____int3rpr3t3r____, ',', 2) %} | ||
{% set my_list = [] %}\ | ||
{% macro macro_append(num) %}\ | ||
{% do my_list.append(num) %}\ | ||
{{ my_list }}\ | ||
{% endmacro %}\ | ||
{% if [] == filter:split.filter(macro_append(deferred), ____int3rpr3t3r____, ',', 2) %} | ||
{{ my_list }} | ||
{% endif %} |
9 changes: 6 additions & 3 deletions
9
src/test/resources/eager/defers-on-immutable-mode.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
{% set foo = 1 %}{% if deferred %} | ||
{% set foo = 1 %}\ | ||
{% if deferred %} | ||
{% set foo = 2 %} | ||
{% else %} | ||
{% set foo = 3 %} | ||
{% endif %} | ||
{{ foo }} | ||
|
||
{% for __ignored__ in [0] %}{% set bar = 1 + deferred %} | ||
{% for __ignored__ in [0] %}\ | ||
{% set bar = 1 + deferred %} | ||
{% set bar = bar + deferred %} | ||
{% endfor %}1 | ||
{% endfor %}\ | ||
1 |
75 changes: 58 additions & 17 deletions
75
src/test/resources/eager/does-not-override-import-modification-in-for.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,81 @@ | ||
{% set foo = 'start' %}{% for __ignored__ in [0] %} | ||
{% do %}{% set current_path = 'deferred-modification.jinja' %}{% set __temp_import_alias_3016318__ = {} %}{% for __ignored__ in [0] %}{% if deferred %} | ||
{% set foo = 'start' %}\ | ||
{% for __ignored__ in [0] %} | ||
{% do %}\ | ||
{% set current_path = 'deferred-modification.jinja' %}\ | ||
{% set __temp_import_alias_3016318__ = {} %}\ | ||
{% for __ignored__ in [0] %}\ | ||
{% if deferred %} | ||
|
||
{% set foo = 'starta' %}{% do __temp_import_alias_3016318__.update({'foo': foo}) %} | ||
{% set foo = 'starta' %}\ | ||
{% do __temp_import_alias_3016318__.update({'foo': foo}) %} | ||
|
||
{% endif %} | ||
|
||
{% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}{% do __temp_import_alias_3016318__.update({'foo': foo}) %} | ||
{% do __temp_import_alias_3016318__.update({'foo': foo,'import_resource_path': 'deferred-modification.jinja'}) %}{% endfor %}{% set bar1 = __temp_import_alias_3016318__ %}{% set current_path = '' %}{% enddo %} | ||
{% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ | ||
{% do __temp_import_alias_3016318__.update({'foo': foo}) %} | ||
{% do __temp_import_alias_3016318__.update({'foo': foo,'import_resource_path': 'deferred-modification.jinja'}) %}\ | ||
{% endfor %}\ | ||
{% set bar1 = __temp_import_alias_3016318__ %}\ | ||
{% set current_path = '' %}\ | ||
{% enddo %} | ||
{{ bar1.foo }} | ||
{% do %}{% set current_path = 'deferred-modification.jinja' %}{% set __temp_import_alias_3016319__ = {} %}{% for __ignored__ in [0] %}{% if deferred %} | ||
{% do %}\ | ||
{% set current_path = 'deferred-modification.jinja' %}\ | ||
{% set __temp_import_alias_3016319__ = {} %}\ | ||
{% for __ignored__ in [0] %}\ | ||
{% if deferred %} | ||
|
||
{% set foo = filter:join.filter([foo, 'a'], ____int3rpr3t3r____, '') %}{% do __temp_import_alias_3016319__.update({'foo': foo}) %} | ||
{% set foo = filter:join.filter([foo, 'a'], ____int3rpr3t3r____, '') %}\ | ||
{% do __temp_import_alias_3016319__.update({'foo': foo}) %} | ||
|
||
{% endif %} | ||
|
||
{% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}{% do __temp_import_alias_3016319__.update({'foo': foo}) %} | ||
{% do __temp_import_alias_3016319__.update({'import_resource_path': 'deferred-modification.jinja'}) %}{% endfor %}{% set bar2 = __temp_import_alias_3016319__ %}{% set current_path = '' %}{% enddo %} | ||
{% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ | ||
{% do __temp_import_alias_3016319__.update({'foo': foo}) %} | ||
{% do __temp_import_alias_3016319__.update({'import_resource_path': 'deferred-modification.jinja'}) %}\ | ||
{% endfor %}\ | ||
{% set bar2 = __temp_import_alias_3016319__ %}\ | ||
{% set current_path = '' %}\ | ||
{% enddo %} | ||
{{ bar2.foo }} | ||
|
||
{% do %}{% set current_path = 'deferred-modification.jinja' %}{% set __temp_import_alias_3016318__ = {} %}{% for __ignored__ in [0] %}{% if deferred %} | ||
{% do %}\ | ||
{% set current_path = 'deferred-modification.jinja' %}\ | ||
{% set __temp_import_alias_3016318__ = {} %}\ | ||
{% for __ignored__ in [0] %}\ | ||
{% if deferred %} | ||
|
||
{% set foo = filter:join.filter([foo, 'a'], ____int3rpr3t3r____, '') %}{% do __temp_import_alias_3016318__.update({'foo': foo}) %} | ||
{% set foo = filter:join.filter([foo, 'a'], ____int3rpr3t3r____, '') %}\ | ||
{% do __temp_import_alias_3016318__.update({'foo': foo}) %} | ||
|
||
{% endif %} | ||
|
||
{% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}{% do __temp_import_alias_3016318__.update({'foo': foo}) %} | ||
{% do __temp_import_alias_3016318__.update({'import_resource_path': 'deferred-modification.jinja'}) %}{% endfor %}{% set bar1 = __temp_import_alias_3016318__ %}{% set current_path = '' %}{% enddo %} | ||
{% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ | ||
{% do __temp_import_alias_3016318__.update({'foo': foo}) %} | ||
{% do __temp_import_alias_3016318__.update({'import_resource_path': 'deferred-modification.jinja'}) %}\ | ||
{% endfor %}\ | ||
{% set bar1 = __temp_import_alias_3016318__ %}\ | ||
{% set current_path = '' %}\ | ||
{% enddo %} | ||
{{ bar1.foo }} | ||
{% do %}{% set current_path = 'deferred-modification.jinja' %}{% set __temp_import_alias_3016319__ = {} %}{% for __ignored__ in [0] %}{% if deferred %} | ||
{% do %}\ | ||
{% set current_path = 'deferred-modification.jinja' %}\ | ||
{% set __temp_import_alias_3016319__ = {} %}\ | ||
{% for __ignored__ in [0] %}\ | ||
{% if deferred %} | ||
|
||
{% set foo = filter:join.filter([foo, 'a'], ____int3rpr3t3r____, '') %}{% do __temp_import_alias_3016319__.update({'foo': foo}) %} | ||
{% set foo = filter:join.filter([foo, 'a'], ____int3rpr3t3r____, '') %}\ | ||
{% do __temp_import_alias_3016319__.update({'foo': foo}) %} | ||
|
||
{% endif %} | ||
|
||
{% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}{% do __temp_import_alias_3016319__.update({'foo': foo}) %} | ||
{% do __temp_import_alias_3016319__.update({'import_resource_path': 'deferred-modification.jinja'}) %}{% endfor %}{% set bar2 = __temp_import_alias_3016319__ %}{% set current_path = '' %}{% enddo %} | ||
{% set foo = filter:join.filter([foo, 'b'], ____int3rpr3t3r____, '') %}\ | ||
{% do __temp_import_alias_3016319__.update({'foo': foo}) %} | ||
{% do __temp_import_alias_3016319__.update({'import_resource_path': 'deferred-modification.jinja'}) %}\ | ||
{% endfor %}\ | ||
{% set bar2 = __temp_import_alias_3016319__ %}\ | ||
{% set current_path = '' %}\ | ||
{% enddo %} | ||
{{ bar2.foo }} | ||
{% endfor %} | ||
{{ foo }} |
6 changes: 4 additions & 2 deletions
6
src/test/resources/eager/does-not-reconstruct-variable-in-set-in-wrong-scope.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{% set my_list = [] %}{% set foo %} | ||
{% do my_list.append(deferred) %}a | ||
{% set my_list = [] %}\ | ||
{% set foo %} | ||
{% do my_list.append(deferred) %}\ | ||
a | ||
{% endset %} | ||
{{ my_list }} |
12 changes: 8 additions & 4 deletions
12
src/test/resources/eager/does-not-reconstruct-variable-in-wrong-scope.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/test/resources/eager/doesnt-affect-parent-from-eager-if.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
src/test/resources/eager/doesnt-double-append-in-deferred-if-tag.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{% set foo = [0, 1] %}{% if deferred == true %} | ||
{% set foo = [0, 1] %}\ | ||
{% if deferred == true %} | ||
[0, 1] | ||
{% do foo.append(2) %} | ||
{% else %} | ||
[0, 1] | ||
{% do foo.append(3) %} | ||
{% endif %} | ||
{{ foo }} | ||
{{ foo }} |
9 changes: 6 additions & 3 deletions
9
src/test/resources/eager/doesnt-double-append-in-deferred-macro.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
{% set my_list = ['a'] %}{% set __macro_foo_97643642_temp_variable_0__ %} | ||
{% set my_list = ['a'] %}\ | ||
{% set __macro_foo_97643642_temp_variable_0__ %} | ||
a | ||
{% if deferred %} | ||
{% do my_list.append('b') %}b | ||
{% do my_list.append('b') %}\ | ||
b | ||
{% endif %} | ||
{% endset %}{{ __macro_foo_97643642_temp_variable_0__ }} | ||
{% endset %}\ | ||
{{ __macro_foo_97643642_temp_variable_0__ }} | ||
{{ my_list }} |
6 changes: 4 additions & 2 deletions
6
src/test/resources/eager/doesnt-double-append-in-deferred-set.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
{% set my_list = ['a'] %}{% set foo %} | ||
{% set my_list = ['a'] %}\ | ||
{% set foo %} | ||
a | ||
{% if deferred %} | ||
{% do my_list.append('b') %}b | ||
{% do my_list.append('b') %}\ | ||
b | ||
{% endif %} | ||
{% endset %} | ||
{{ my_list }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
{% set foo = [0] %}{% if false %}{% elif deferred && foo.append(1) %}1{% elif deferred && foo.append(2) %}2{% endif %} | ||
{% set foo = [0] %}\ | ||
{% if false %}\ | ||
{% elif deferred && foo.append(1) %}\ | ||
1{% elif deferred && foo.append(2) %}\ | ||
2{% endif %} | ||
{{ foo }} |
Oops, something went wrong.