Tests
Test: array
Template
{{ items|upper }}
Data
{
"items": [
"my first car",
"my Second car",
"my THIRD car"
]
}
Output Django v1.10.1
[U'MY FIRST CAR', U'MY SECOND CAR', U'MY THIRD CAR']
Output Jinja2 v2.8.0
[U'MY FIRST CAR', U'MY SECOND CAR', U'MY THIRD CAR']
Output Liquid v3.0.6
my first carmy Second carmy THIRD car
Output Nunjucks (error) v2.5.0
TypeError: str.toUpperCase is not a function
Output Swig v1.4.2
MY FIRST CAR,MY SECOND CAR,MY THIRD CAR
Output Twig (error) v1.24.2
(no output)
Output Twigjs v0.9.5
my first car,my Second car,my THIRD car
Test: number
Template
{{ 5|upper }}
Output Django v1.10.1
5
Output Jinja2 v2.8.0
5
Output Liquid v3.0.6
5
Output Nunjucks (error) v2.5.0
TypeError: str.toUpperCase is not a function
Output Swig v1.4.2
5
Output Twig v1.24.2
5
Output Twigjs v0.9.5
5
Test: string
Template
{{ 'My first CAR'|upper }}
Output Django v1.10.1
MY FIRST CAR
Output Jinja2 v2.8.0
MY FIRST CAR
Output Liquid v3.0.6
My first CAR
Output Nunjucks v2.5.0
MY FIRST CAR
Output Swig v1.4.2
MY FIRST CAR
Output Twig v1.24.2
MY FIRST CAR
Output Twigjs v0.9.5
MY FIRST CAR