mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 01:58:24 +00:00
tests
This commit is contained in:
parent
e45d3d98ff
commit
f15d6b8e54
3 changed files with 8 additions and 3 deletions
|
@ -24,9 +24,14 @@ def test_re_match():
|
|||
|
||||
|
||||
def test_escape():
|
||||
# Potential tags
|
||||
assert escape("foo[bar]") == r"foo\[bar]"
|
||||
assert escape(r"foo\[bar]") == r"foo\\\[bar]"
|
||||
|
||||
# Not tags (escape not required)
|
||||
assert escape("[5]") == "[5]"
|
||||
assert escape("\\[5]") == "\\[5]"
|
||||
|
||||
|
||||
def test_render_escape():
|
||||
console = Console(width=80, color_system=None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue