diff --git a/src/component/test.rs b/src/component/test.rs index ff9afb3..623a6e9 100644 --- a/src/component/test.rs +++ b/src/component/test.rs @@ -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; }