sasae/tests/test-global.twig

22 lines
970 B
Twig
Raw Permalink Normal View History

2023-08-24 22:31:36 +00:00
{% set ndx_version_output = ndx_version() %}
{% set sasae_version_output = sasae_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 ~ '".') }}
sasae_version {{ sasae_version_output == expect.sasae_version ? 'works!' : ('returned "' ~ sasae_version_output ~ '" instead of "' ~ expect.sasae_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>