diff --git a/plugins/SedRegex/test.py b/plugins/SedRegex/test.py index 06b574e5a..3df4ca2ee 100644 --- a/plugins/SedRegex/test.py +++ b/plugins/SedRegex/test.py @@ -109,10 +109,16 @@ class SedRegexTestCase(ChannelPluginTestCase): self.feedMsg('ouch', frm=self.__class__.other2) self.feedMsg('poof', frm=self.__class__.other) self.feedMsg('wow!') + + # This should work regardless of whether we use "nick," or "nick:" as prefix self.feedMsg('%s: s/^/p/' % ircutils.nickFromHostmask(self.__class__.other2)) m = self.getMsg(' ') self.assertIn('pouch', str(m)) + self.feedMsg('%s, s/^/c/' % ircutils.nickFromHostmask(self.__class__.other2)) + m = self.getMsg(' ') + self.assertIn('couch', str(m)) + @unittest.skipUnless(sys.version_info[0] >= 3, 'Test fails on Python 2.') def testBoldReplacement(self): with conf.supybot.plugins.sedregex.boldReplacementText.context(True):