eec31c4938
Signed-off-by: Michael Mayer <michael@photoprism.app>
22 lines
499 B
Go
22 lines
499 B
Go
package txt
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestUcFirst(t *testing.T) {
|
|
t.Run("photo-lover", func(t *testing.T) {
|
|
assert.Equal(t, "Photo-lover", UpperFirst("photo-lover"))
|
|
})
|
|
t.Run("cat", func(t *testing.T) {
|
|
assert.Equal(t, "Cat", UpperFirst("Cat"))
|
|
})
|
|
t.Run("KwaZulu natal", func(t *testing.T) {
|
|
assert.Equal(t, "KwaZulu natal", UpperFirst("KwaZulu natal"))
|
|
})
|
|
t.Run("empty string", func(t *testing.T) {
|
|
assert.Equal(t, "", UpperFirst(""))
|
|
})
|
|
}
|