aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pydis_core
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2025-08-10 22:23:39 +0100
committerGravatar Joe Banks <[email protected]>2025-08-10 22:25:34 +0100
commitcad2251cbbd9a2a8e8b682795fca7d20c6cbc8d3 (patch)
tree2cec3d03b5f9f6ab2df0f493fc8c8f302973a35e /tests/pydis_core
parentRelease version 11.6.1 (diff)
Update Regex to include Discord protocol format (#304)
Chris is traveling abroad and is unable to access. Therefore, Fisher have become his proxy. An 'apprentice' if you will. Shame because Fisher have years more software engineering experience compared to him. Unfortunately, neither Fisher nor Chris cared to separate the version bump into a separate commit so SENIOR Engineer Joe Banks to JUNIOR Engineer Chris Lovering with INTERN Fisher has had to Get Involved. Co-authored-by: ChrisLovering <[email protected]> Co-authored-by: fisher60 <[email protected]>
Diffstat (limited to 'tests/pydis_core')
-rw-r--r--tests/pydis_core/utils/test_regex.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/pydis_core/utils/test_regex.py b/tests/pydis_core/utils/test_regex.py
index 79c1d743..26fe23ea 100644
--- a/tests/pydis_core/utils/test_regex.py
+++ b/tests/pydis_core/utils/test_regex.py
@@ -49,6 +49,11 @@ class UtilsRegexTests(unittest.TestCase):
self.assertEqual(search_regex("https://discord.gg/python with whitespace"), "python")
self.assertEqual(search_regex(" https://discord.gg/python "), "python")
+ self.assertEqual(search_regex("discord:#@discordapp.com/invite/python"), "python")
+ self.assertEqual(search_regex("discord:/#@discordapp.com/invite/python"), "python")
+ self.assertEqual(search_regex("discord://#@discordapp.com/invite/python"), "python")
+ self.assertEqual(search_regex("discord://@#discordapp.com/invite/python"), "python")
+
def test_discord_invite_negatives(self):
"""Test the DISCORD_INVITE regex on a set of strings we would expect to not capture."""