From 549a13f20462627bec7e0612e2cefdb7fd9bbdb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 25 Jan 2019 21:51:49 +0100 Subject: [PATCH] tests: Add color input line parsing test. --- tests/color_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/color_test.py b/tests/color_test.py index 1c10405..012c558 100644 --- a/tests/color_test.py +++ b/tests/color_test.py @@ -56,3 +56,8 @@ def test_normalize_spaces_in_inline_code(): formatted = Formatted.from_input_line('` * a * `') assert formatted.to_weechat() == valid_result + +def test_input_line_color(): + formatted = Formatted.from_input_line("\x0304Hello") + assert "\x1b[038;5;9mHello\x1b[039m" == formatted.to_weechat() + assert "Hello" == formatted.to_html()