diff options
Diffstat (limited to 'tests/pydis_core')
-rw-r--r-- | tests/pydis_core/utils/test_regex.py | 5 |
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.""" |