mirror of
https://github.com/pantor/inja.git
synced 2026-11-20 06:46:53 +00:00
* fix: return empty string from capitalize on empty input (#337) Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com> * fix: return empty string from capitalize on empty input (#337) Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com> * fix: return empty string from capitalize on empty input (#337) Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com> --------- Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com> Co-authored-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com>
This commit is contained in:
1 parent
94289188ea
commit
fb1437ba59
3 files changed
+9
-4
No files matched your search
@@ -65,6 +65,7 @@ TEST_CASE("functions") {
|
||||
SUBCASE("capitalize") {
|
||||
CHECK(env.render("{{ capitalize(name) }}", data) == "Peter");
|
||||
CHECK(env.render("{{ capitalize(city) }}", data) == "New york");
|
||||
CHECK(env.render("{{ capitalize(\"\") }}", data) == "");
|
||||
}
|
||||
|
||||
SUBCASE("range") {
|
||||
|
||||
Reference in new issue
Block a user