Backend: Move string shortening functions to /pkg/txt/clip

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-09-05 01:45:57 +02:00
parent fd571f70b0
commit a2fd10fddd
26 changed files with 246 additions and 73 deletions

View File

@@ -368,7 +368,7 @@ func TestFile_SetProjection(t *testing.T) {
p := projection.New(" 幸福 Hanzi are logograms developed for the writing of Chinese! Expressions in an index may not ...!")
m.SetProjection(p.String())
assert.Equal(t, p.String(), m.FileProjection)
assert.GreaterOrEqual(t, clean.ClipType, len(m.FileProjection))
assert.GreaterOrEqual(t, clean.LengthType, len(m.FileProjection))
})
}