aboutsummaryrefslogtreecommitdiffstats
path: root/testing/templates
diff options
context:
space:
mode:
authorLibravatar vallentin <mail@vallentin.dev>2020-12-23 15:11:53 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-12-25 22:42:44 +0100
commit20f34be742b27f18d944d60dcb3e04b822c6d9ef (patch)
tree4406d7bbb4ca3068b65ad7a54e5dbe2b4684744a /testing/templates
parentfd4ece308e851afe0653ab2b2ad2060914de7486 (diff)
downloadaskama-20f34be742b27f18d944d60dcb3e04b822c6d9ef.tar.gz
askama-20f34be742b27f18d944d60dcb3e04b822c6d9ef.tar.bz2
askama-20f34be742b27f18d944d60dcb3e04b822c6d9ef.zip
Added let shadow test
Diffstat (limited to '')
-rw-r--r--testing/templates/let-shadow.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/templates/let-shadow.html b/testing/templates/let-shadow.html
new file mode 100644
index 0000000..938c5bf
--- /dev/null
+++ b/testing/templates/let-shadow.html
@@ -0,0 +1,22 @@
+{%- let a = 1 -%}
+{%- let b -%}
+
+{%- if cond -%}
+ {%- let b = 22 -%}
+ {{ b }}-
+
+ {%- let b = 33 -%}
+ {{ a }}-{{ b }}-
+{%- else -%}
+ {%- let b = 222 -%}
+ {{ b }}-
+
+ {%- let b = 333 -%}
+ {{ a }}-{{ b }}-
+
+ {%- let (a, b) = Self::tuple() -%}
+ {{ a }}-{{ b }}-
+{%- endif -%}
+
+{%- let a = 11 -%}
+{{ a }}-{{ b }}