diff options
author | 2020-10-22 12:30:18 -0700 | |
---|---|---|
committer | 2020-10-22 12:30:18 -0700 | |
commit | 1a391055311c8d1861b4ca7b7ee1161b2418f9e8 (patch) | |
tree | 103c5eb134a16bffdb2fc373a2405e2bddf77e52 /tests | |
parent | Merge pull request #1250 from python-discord/mbaruh-user-command (diff) | |
parent | clarify prepare_input doc (diff) |
Merge pull request #1212 from mbaruh/master
Added interleaving text in code blocks option
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/exts/utils/test_snekbox.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/bot/exts/utils/test_snekbox.py b/tests/bot/exts/utils/test_snekbox.py index 6601fad2c..9a42d0610 100644 --- a/tests/bot/exts/utils/test_snekbox.py +++ b/tests/bot/exts/utils/test_snekbox.py @@ -52,6 +52,13 @@ class SnekboxTests(unittest.IsolatedAsyncioTestCase): ('`print("Hello world!")`', 'print("Hello world!")', 'one line code block'), ('```\nprint("Hello world!")```', 'print("Hello world!")', 'multiline code block'), ('```py\nprint("Hello world!")```', 'print("Hello world!")', 'multiline python code block'), + ('text```print("Hello world!")```text', 'print("Hello world!")', 'code block surrounded by text'), + ('```print("Hello world!")```\ntext\n```py\nprint("Hello world!")```', + 'print("Hello world!")\nprint("Hello world!")', 'two code blocks with text in-between'), + ('`print("Hello world!")`\ntext\n```print("How\'s it going?")```', + 'print("How\'s it going?")', 'code block preceded by inline code'), + ('`print("Hello world!")`\ntext\n`print("Hello world!")`', + 'print("Hello world!")', 'one inline code block of two') ) for case, expected, testname in cases: with self.subTest(msg=f'Extract code from {testname}.'): |