Skip to content

Commit

Permalink
test: add test for uncapitalize
Browse files Browse the repository at this point in the history
  • Loading branch information
42atomys committed Aug 22, 2024
1 parent 449baff commit a3fb11f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions registry/strings/functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,9 @@ func TestUncapitalize(t *testing.T) {
{Name: "UncapitalizeWithSpace", Input: `{{ " Foo bar" | uncapitalize }}`, Expected: " foo bar"},
{Name: "UncapitalizeWithNumber", Input: `{{ "123Boo_bar" | uncapitalize }}`, Expected: "123boo_bar"},
{Name: "UncapitalizeWithUnderscore", Input: `{{ "Boo_bar" | uncapitalize }}`, Expected: "boo_bar"},
{Name: "UncapitalizeWithEmoji", Input: `{{ "👍 Good" | uncapitalize }}`, Expected: "👍 good"},
{Name: "UncapitalizeWithUnicode", Input: `{{ "Été" | uncapitalize }}`, Expected: "été"},
{Name: "UncapitalizeWithArabic", Input: `{{ "مرحبا" | uncapitalize }}`, Expected: "مرحبا"},
}

pesticide.RunTestCases(t, strings.NewRegistry(), tc)
Expand Down

0 comments on commit a3fb11f

Please sign in to comment.