mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-14 11:23:09 +02:00
18 lines
372 B
Go
18 lines
372 B
Go
|
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)
|
||
|
}
|
||
|
}
|
||
|
}
|