mirror of
https://github.com/photoprism/photoprism.git
synced 2025-11-03 02:53:36 +08:00
Codespell: Fix invalid inline comments and broken test assertions #4506
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -30,7 +30,7 @@ func TestClip(t *testing.T) {
|
||||
})
|
||||
t.Run("ToASCII", func(t *testing.T) {
|
||||
result := Clip(ToASCII(strings.ToLower(" 幸福 Hanzi are logograms developed for the writing of Chinese! Expressions in an index may not ...!")), ClipStringType)
|
||||
assert.Equal(t, "hanzi are logograms developed for the writing of chinese! express", result)
|
||||
assert.Equal(t, "hanzi are logograms developed for the writing of chinese! expres", result)
|
||||
assert.Equal(t, 64, len(result))
|
||||
})
|
||||
t.Run("Empty", func(t *testing.T) {
|
||||
@@ -42,12 +42,12 @@ func TestClip(t *testing.T) {
|
||||
|
||||
func TestSanitizeStringType(t *testing.T) {
|
||||
result := SanitizeStringType(" 幸福 Hanzi are logograms developed for the writing of Chinese! Expressions in an index may not ...!")
|
||||
assert.Equal(t, "Hanzi are logograms developed for the writing of Chinese! Expres", result)
|
||||
assert.Equal(t, "Hanzi are logograms developed for the writing of Chinese! Expres", result) // codespell:ignore
|
||||
assert.Equal(t, ClipStringType, len(result))
|
||||
}
|
||||
|
||||
func TestSanitizeStringTypeLower(t *testing.T) {
|
||||
result := SanitizeStringTypeLower(" 幸福 Hanzi are logograms developed for the writing of Chinese! Expressions in an index may not ...!")
|
||||
assert.Equal(t, "hanzi are logograms developed for the writing of chinese! express", result)
|
||||
assert.Equal(t, "hanzi are logograms developed for the writing of chinese! expres", result) // codespell:ignore
|
||||
assert.Equal(t, ClipStringType, len(result))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user