TestComponent: Remove hl_bg method

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-01-07 16:02:40 +01:00
parent 6692443b18
commit 8cee98288b
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -204,10 +204,6 @@ impl Component {
buf
}
fn hl_bg(color: String) -> String {
format!("{}{}", color, "\x1b[48;5;8m")
}
fn compare_hl(expected: &str, actual: &str) -> String {
let hl_expected = Component::hl(expected.clone());
let hl_actual = Component::hl(actual.clone());
@ -267,7 +263,8 @@ impl Component {
}
if ! color_added && ! color_start && let Some(ref color) = last_color {
buf_expected.push_str(format!("{}", Component::hl_bg(color.clone())).as_str());
// Change background
buf_expected.push_str(format!("{}{}", color, "\x1b[48;5;8m").as_str());
color_added = true;
}