diff options
Diffstat (limited to 'tests/test_render_blocks.py')
-rw-r--r-- | tests/test_render_blocks.py | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/test_render_blocks.py b/tests/test_render_blocks.py index a8f918c..fedbab6 100644 --- a/tests/test_render_blocks.py +++ b/tests/test_render_blocks.py @@ -372,6 +372,62 @@ cases: List[Case] = [ "<[color:bold]><[color:italic]>*_bold and italic combined_*<[color:-italic]><[color:-bold]>" ], }, + { + "blocks": [ + { + "type": "rich_text", + "block_id": "tm5d+", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "foo", + "style": {"italic": True, "code": True}, + }, + { + "type": "text", + "text": "bar", + "style": {"bold": True, "code": True}, + }, + ], + } + ], + } + ], + "rendered": [ + "<[color:italic]>`_foo_<[color:-italic]><[color:bold]>*bar*`<[color:-bold]>" + ], + }, + { + "blocks": [ + { + "type": "rich_text", + "block_id": "A+l5x", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "all styles", + "style": { + "bold": True, + "italic": True, + "strike": True, + "code": True, + }, + } + ], + } + ], + } + ], + "rendered": [ + "<[color:bold]><[color:italic]>`*_~all styles~_*`<[color:-italic]><[color:-bold]>" + ], + }, ] |