mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-18 22:23:07 -03:00
Implement getting color code for languages
Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
This commit is contained in:
@ -133,3 +133,19 @@ func TestIsDotFile(t *testing.T) {
|
||||
assert.Equal(t, test.expected, is, fmt.Sprintf("%v: is = %v, expected: %v", test.name, is, test.expected))
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetColor(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
language string
|
||||
expected string
|
||||
}{
|
||||
{name: "TestGetColor_1", language: "Go", expected: "#00ADD8"},
|
||||
{name: "TestGetColor_2", language: "SomeRandom", expected: "#cccccc"},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
color := GetColor(test.language)
|
||||
assert.Equal(t, test.expected, color, fmt.Sprintf("%v: is = %v, expected: %v", test.name, color, test.expected))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user