index/tests/TemplatingTest-global.twig

19 lines
756 B
Twig

{% set ndx_version_output = ndx_version() %}
{% set twig_version_output = twig_version() %}
ndx_version {{ ndx_version_output == expect.ndx_version ? 'works!' : ('returned "' ~ ndx_version_output ~ '" instead of "' ~ expect.ndx_version ~ '".') }}
twig_version {{ twig_version_output == expect.twig_version ? 'works!' : ('returned "' ~ twig_version_output ~ '" instead of "' ~ expect.twig_version ~ '".') }}
global_var = {{ global_var }}
{{ 'meow'|test_filter }}
{{ test_function('the') }}
{{ 'test' is test_test ? 'test works' : 'test does not work' }}
{{ 'Mewow'|data_uri(mime="text/plain") }}
{{ 'Mewow'|data_uri(mime="application/octet-stream") }}
<div class="{{ html_classes('always', {
'shows-up': true,
'doesnt': false,
}) }}">yay</div>