Add custom theming
This commit is contained in:
@@ -88,8 +88,8 @@ func TestDetailRendersSuggestionAsRemovalAndAddition(t *testing.T) {
|
||||
func TestSuggestionBackgroundIsDirectionalWithoutTextUnderline(t *testing.T) {
|
||||
removed := suggestionHighlight(" - ", "old", 12, '-')
|
||||
added := suggestionHighlight(" + ", "new", 12, '+')
|
||||
if !strings.Contains(removed, "\x1b[48;5;52m") ||
|
||||
!strings.Contains(added, "\x1b[48;5;22m") {
|
||||
if !strings.Contains(removed, suggestionRemoveBackground) ||
|
||||
!strings.Contains(added, suggestionAddBackground) {
|
||||
t.Fatalf("suggestion decorations missing: removed=%q added=%q", removed, added)
|
||||
}
|
||||
if strings.Contains(removed, "\x1b[4m") || strings.Contains(added, "\x1b[4m") ||
|
||||
@@ -100,8 +100,8 @@ func TestSuggestionBackgroundIsDirectionalWithoutTextUnderline(t *testing.T) {
|
||||
if ansi.StringWidth(removed) != 12 || ansi.StringWidth(added) != 12 {
|
||||
t.Fatal("suggestion backgrounds do not fill the row")
|
||||
}
|
||||
if !strings.Contains(removed, "\x1b[0m\x1b[48;5;52m ") ||
|
||||
!strings.Contains(added, "\x1b[0m\x1b[48;5;22m ") {
|
||||
if !strings.Contains(removed, "\x1b[0m"+suggestionRemoveBackground+" ") ||
|
||||
!strings.Contains(added, "\x1b[0m"+suggestionAddBackground+" ") {
|
||||
t.Fatal("padded row remainder is still underlined")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user