Skip to content

Commit 9a1421d

Browse files
REALERvolker1sharkdp
authored andcommitted
Add owo-colors test
1 parent 196253b commit 9a1421d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/style.rs

+16
Original file line numberDiff line numberDiff line change
@@ -855,4 +855,20 @@ mod tests {
855855
cross.apply("wow").to_string()
856856
);
857857
}
858+
859+
#[cfg(all(feature = "owo-colors"))]
860+
#[test]
861+
fn coloring_owo_colors() {
862+
use owo_colors::OwoColorize;
863+
let style = Style {
864+
font_style: FontStyle {
865+
bold: true,
866+
..Default::default()
867+
},
868+
foreground: Some(Color::Blue),
869+
..Default::default()
870+
};
871+
let owo = style.to_owo_colors_style();
872+
assert_eq!("\x1b[34;1mwow\x1b[0m", "wow".style(owo).to_string());
873+
}
858874
}

0 commit comments

Comments
 (0)