tests: Add color input line parsing test.

This commit is contained in:
Damir Jelić 2019-01-25 21:51:49 +01:00
parent db17c6272d
commit 549a13f204

View file

@ -56,3 +56,8 @@ def test_normalize_spaces_in_inline_code():
formatted = Formatted.from_input_line('` * a * `') formatted = Formatted.from_input_line('` * a * `')
assert formatted.to_weechat() == valid_result 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 "<font data-mx-color=#ff0000>Hello</font>" == formatted.to_html()