{% namespace tests.filters %}

{% macro default1(name) -%}
Hello, {{ name | default('World') }}
{%- endmacro %}

{% macro truncate1(s, length) -%}
{{ s|truncate(length) }}
{%- endmacro %}

{% macro capitalize(s) -%}
{{ s|capitalize}}
{%- endmacro %}

{% macro last() -%}
{{ [1, 2, 3]|last }}
{%- endmacro %}

{% macro len() -%}
{{ [1, 2, 3, 5]|length }}
{%- endmacro %}

{% macro replace1() -%}
{{ "Hello World"|replace("Hello", "Goodbye") }}
{%- endmacro %}

{% macro round1(num, precision) -%}
{{ num|round(precision = precision) }}
{%- endmacro %}
