aboutsummaryrefslogtreecommitdiffstats
path: root/testing/templates
diff options
context:
space:
mode:
Diffstat (limited to 'testing/templates')
-rw-r--r--testing/templates/macro-import-str-cmp-macro.html13
-rw-r--r--testing/templates/macro-import-str-cmp.html15
2 files changed, 28 insertions, 0 deletions
diff --git a/testing/templates/macro-import-str-cmp-macro.html b/testing/templates/macro-import-str-cmp-macro.html
new file mode 100644
index 0000000..a951f93
--- /dev/null
+++ b/testing/templates/macro-import-str-cmp-macro.html
@@ -0,0 +1,13 @@
+{% macro strcmp0(s, other) -%}
+ {%- if s == "foo" -%}
+ foo
+ {%- else if s == other -%}
+ other
+ {%- else -%}
+ neither
+ {%- endif -%}
+{% endmacro %}
+
+{% macro strcmp(s) %}
+ {%- call strcmp0(s, "bar") -%}
+{% endmacro %}
diff --git a/testing/templates/macro-import-str-cmp.html b/testing/templates/macro-import-str-cmp.html
new file mode 100644
index 0000000..648a0cf
--- /dev/null
+++ b/testing/templates/macro-import-str-cmp.html
@@ -0,0 +1,15 @@
+{%- import "macro-import-str-cmp-macro.html" as macros -%}
+
+A
+
+{%- call macros::strcmp("foo") -%}
+
+B
+
+{%- call macros::strcmp("bar") -%}
+
+C
+
+{%- call macros::strcmp("cat") -%}
+
+D