aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-03-07 05:18:02 +0100
committerGravatar Numerlor <[email protected]>2021-03-07 05:18:02 +0100
commitdc7eef432189aaaf0ea8b0d16588852306104957 (patch)
treeba9da1c377ea704c1a55d14d9dd79963aa2dc2be /tests
parentRemove superfluous comment (diff)
Handle arbitrary amount of backslashes preceding the quote char
Tests for this were added additionally
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/exts/info/doc/test_parsing.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/bot/exts/info/doc/test_parsing.py b/tests/bot/exts/info/doc/test_parsing.py
index f302b38fc..1663d8491 100644
--- a/tests/bot/exts/info/doc/test_parsing.py
+++ b/tests/bot/exts/info/doc/test_parsing.py
@@ -42,6 +42,13 @@ class SignatureSplitter(TestCase):
)
self._run_tests(test_cases)
+ def test_quote_escaped(self):
+ test_cases = (
+ (r"'\',','\\',0", [r"'\','", r"'\\'", "0"]),
+ (r"'0\',0\\\'\\',0", [r"'0\',0\\\'\\'", "0"]),
+ )
+ self._run_tests(test_cases)
+
def test_real_signatures(self):
test_cases = (
("start, stop[, step]", ["start", " stop[, step]"]),