Metadata: Add tests to pkg/txt/file_title_test.go

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-11-01 12:04:37 +01:00
parent 7ec6b7e66f
commit fe182d78f4

View file

@ -40,6 +40,12 @@ func TestFileTitle(t *testing.T) {
t.Run("IMG_4568", func(t *testing.T) {
assert.Equal(t, "", FileTitle("IMG_4568"))
})
t.Run("mr-kitty_life.svg", func(t *testing.T) {
assert.Equal(t, "Mr Kitty Life", FileTitle("mr-kitty_life.svg"))
})
t.Run("mr-kitty--life.svg", func(t *testing.T) {
assert.Equal(t, "Mr Kitty / Life", FileTitle("mr-kitty--life.svg"))
})
t.Run("queen-city-yacht-club--toronto-island_7999432607_o.jpg", func(t *testing.T) {
assert.Equal(t, "Queen City Yacht Club / Toronto Island", FileTitle("queen-city-yacht-club--toronto-island_7999432607_o.jpg"))
})