Add (disabled) test for unbalanced asterisks at the start of line.
This commit is contained in:
parent
b61e9ecbd8
commit
e9e5facc7c
1 changed files with 13 additions and 1 deletions
|
@ -5,7 +5,7 @@ from __future__ import unicode_literals
|
||||||
import webcolors
|
import webcolors
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from hypothesis import given
|
from hypothesis import given
|
||||||
from hypothesis.strategies import sampled_from
|
from hypothesis.strategies import sampled_from, text
|
||||||
|
|
||||||
from matrix.colors import (G, Formatted, FormattedString,
|
from matrix.colors import (G, Formatted, FormattedString,
|
||||||
color_html_to_weechat, color_weechat_to_html)
|
color_html_to_weechat, color_weechat_to_html)
|
||||||
|
@ -57,6 +57,18 @@ 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
|
||||||
|
|
||||||
|
|
||||||
|
# FIXME: this case doesn't and can't work yet (until a proper Markdown parser
|
||||||
|
# is integrated)
|
||||||
|
# @given(text().map(lambda s: '*' + s)
|
||||||
|
# def test_unpaired_prefix_asterisk_without_space_is_literal(text):
|
||||||
|
# """An unpaired asterisk at the beginning of the line, without a space
|
||||||
|
# after it, is considered literal.
|
||||||
|
# """
|
||||||
|
# formatted = Formatted.from_input_line(text)
|
||||||
|
# assert text == formatted.to_weechat()
|
||||||
|
|
||||||
|
|
||||||
def test_input_line_color():
|
def test_input_line_color():
|
||||||
formatted = Formatted.from_input_line("\x0304Hello")
|
formatted = Formatted.from_input_line("\x0304Hello")
|
||||||
assert "\x1b[038;5;9mHello\x1b[039m" == formatted.to_weechat()
|
assert "\x1b[038;5;9mHello\x1b[039m" == formatted.to_weechat()
|
||||||
|
|
Loading…
Reference in a new issue