mirror of
https://gitlab.com/arnekeller/ascii-table.git
synced 2024-12-04 21:49:08 +00:00
save game
This commit is contained in:
parent
71451d313b
commit
7d75017e72
26
src/test.rs
26
src/test.rs
@ -561,6 +561,32 @@ fn color_codes_b5() {
|
|||||||
assert_eq!(expected, config.format(input));
|
assert_eq!(expected, config.format(input));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn color_codes_s5() {
|
||||||
|
let config = AsciiTable::default();
|
||||||
|
let input = vec![
|
||||||
|
vec![";;;;;".color(Color::Blue).bg_color(Color::Yellow).bold()]
|
||||||
|
];
|
||||||
|
let expected = "┌───────┐\n\
|
||||||
|
│ \u{1b}[38;5;4m\u{1b}[48;5;3;1m;;;;;\u{1b}[0m │\n\
|
||||||
|
└───────┘\n";
|
||||||
|
|
||||||
|
assert_eq!(expected, config.format(input));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn color_codes_n5() {
|
||||||
|
let config = AsciiTable::default();
|
||||||
|
let input = vec![
|
||||||
|
vec!["00000".color(Color::Blue).bg_color(Color::Yellow).bold()]
|
||||||
|
];
|
||||||
|
let expected = "┌───────┐\n\
|
||||||
|
│ \u{1b}[38;5;4m\u{1b}[48;5;3;1m00000\u{1b}[0m │\n\
|
||||||
|
└───────┘\n";
|
||||||
|
|
||||||
|
assert_eq!(expected, config.format(input));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn color_codes() {
|
fn color_codes() {
|
||||||
let config = AsciiTable::default();
|
let config = AsciiTable::default();
|
||||||
|
Loading…
Reference in New Issue
Block a user