1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-27 14:56:49 +03:00
lazygit/pkg/gui/presentation/icons/file_icons_test.go
Stefan Haller f71274b601 Add test to ensure that file icons are one rune
This should prevent errors like that from happening again.
2024-10-13 16:51:27 +02:00

22 lines
417 B
Go

package icons
import (
"testing"
)
func TestFileIcons(t *testing.T) {
t.Run("TestFileIcons", func(t *testing.T) {
for name, icon := range nameIconMap {
if len([]rune(icon.Icon)) != 1 {
t.Errorf("nameIconMap[\"%s\"] is not a single rune", name)
}
}
for ext, icon := range extIconMap {
if len([]rune(icon.Icon)) != 1 {
t.Errorf("extIconMap[\"%s\"] is not a single rune", ext)
}
}
})
}