diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_nativetypes.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_nativetypes.py b/tests/test_nativetypes.py index 9bae938..8c85252 100644 --- a/tests/test_nativetypes.py +++ b/tests/test_nativetypes.py @@ -153,3 +153,10 @@ def test_leading_spaces(env): t = env.from_string(" {{ True }}") result = t.render() assert result == " True" + + +def test_macro(env): + t = env.from_string("{%- macro x() -%}{{- [1,2] -}}{%- endmacro -%}{{- x()[1] -}}") + result = t.render() + assert result == 2 + assert isinstance(result, int) |