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
d84a0de943
commit
d7f0279051
33
src/test.rs
33
src/test.rs
@ -535,6 +535,19 @@ fn color_codes_zero() {
|
||||
assert_eq!(expected, config.format(input));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn color_codes_zero_inbetween() {
|
||||
let config = AsciiTable::default();
|
||||
let input = vec![vec![
|
||||
"He\u{1b}[0ml\u{1b}[0mlo"
|
||||
]];
|
||||
let expected = "┌───────┐\n\
|
||||
│ He\u{1b}[0ml\u{1b}[0mlo │\n\
|
||||
└───────┘\n";
|
||||
|
||||
assert_eq!(expected, config.format(input));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn color_codes_m5() {
|
||||
let config = AsciiTable::default();
|
||||
@ -615,26 +628,6 @@ fn color_codes() {
|
||||
assert_eq!(expected, config.format(input));
|
||||
}
|
||||
|
||||
// \u{1b}[38;2;255;0;0mH
|
||||
// \u{1b}[38;2;255;6;0me
|
||||
// \u{1b}[38;2;255;13;0ml
|
||||
// \u{1b}[38;2;255;19;0ml
|
||||
// \u{1b}[38;2;255;26;0mo
|
||||
// \u{1b}[0m
|
||||
|
||||
// (true, ""),
|
||||
// (false, "\u{1b}[38;2;255;0;0m"),
|
||||
// (true, "H"),
|
||||
// (false, "\u{1b}[38;2;255;6;0m"),
|
||||
// (true, "e"),
|
||||
// (false, "\u{1b}[38;2;255;13;0m"),
|
||||
// (true, "l"),
|
||||
// (false, "\u{1b}[38;2;255;1"),
|
||||
// (true, "9;0ml"),
|
||||
// (false, "\u{1b}[38;2;255;26;0m"),
|
||||
// (true, "o"),
|
||||
// (false, "\u{1b}[0m")
|
||||
|
||||
#[test]
|
||||
fn color_codes_in_header() {
|
||||
let mut config = AsciiTable::default();
|
||||
|
Loading…
Reference in New Issue
Block a user