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:
17
pkg/gui/presentation/commits_test.go
Normal file
17
pkg/gui/presentation/commits_test.go
Normal 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)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user