From 919e0599ea21c87702eb72350dcff4d106ed7db5 Mon Sep 17 00:00:00 2001 From: Gerrit Viljoen Date: Sun, 17 May 2020 12:19:12 +0200 Subject: [PATCH] save game --- src/test.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test.rs b/src/test.rs index 3c1876c..3c9971f 100644 --- a/src/test.rs +++ b/src/test.rs @@ -535,6 +535,19 @@ fn color_codes_zero() { assert_eq!(expected, config.format(input)); } +#[test] +fn color_codes_m5() { + let config = AsciiTable::default(); + let input = vec![ + vec!["mmmmm".color(Color::Blue).bg_color(Color::Yellow).bold()] + ]; + let expected = "┌───────┐\n\ + │ \u{1b}[38;5;4m\u{1b}[48;5;3;1mmmmmm\u{1b}[0m │\n\ + └───────┘\n"; + + assert_eq!(expected, config.format(input)); +} + #[test] fn color_codes() { let config = AsciiTable::default();