1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

associate random colours with authors

This commit is contained in:
Jesse Duffield
2021-10-23 18:17:35 +11:00
parent f704707d29
commit 253504a094
5 changed files with 145 additions and 4 deletions

View File

@ -0,0 +1,17 @@
package presentation
import "testing"
func TestGetInitials(t *testing.T) {
for input, output := 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)
}
}
}