summaryrefslogtreecommitdiffstats
path: root/pkg/gui/presentation/commits_test.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-10-24 15:54:20 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-10-30 18:26:06 +1100
commite122f421e60e56aa3959668234db8d1fb90df289 (patch)
tree820ad931eec113d24fc9bc3fc04d8130454c6f52 /pkg/gui/presentation/commits_test.go
parent6171690b000af4fb495fc9d2930dfa988800ee3f (diff)
only use a single initial for double sized runes
Diffstat (limited to 'pkg/gui/presentation/commits_test.go')
-rw-r--r--pkg/gui/presentation/commits_test.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/gui/presentation/commits_test.go b/pkg/gui/presentation/commits_test.go
index 78b798010..578091166 100644
--- a/pkg/gui/presentation/commits_test.go
+++ b/pkg/gui/presentation/commits_test.go
@@ -3,15 +3,18 @@ package presentation
import "testing"
func TestGetInitials(t *testing.T) {
- for input, output := range map[string]string{
+ for input, expectedOutput := range map[string]string{
"Jesse Duffield": "JD",
"Jesse Duffield Man": "JD",
"JesseDuffield": "Je",
"J": "J",
+ "六书六書": "六",
+ "書": "書",
"": "",
} {
- if output != getInitials(input) {
- t.Errorf("Expected %s to be %s", input, output)
+ output := getInitials(input)
+ if output != expectedOutput {
+ t.Errorf("Expected %s to be %s", output, expectedOutput)
}
}
}